/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    'cn-qingdao' = 'apigateway.cn-qingdao.aliyuncs.com',
    'cn-beijing' = 'apigateway.cn-beijing.aliyuncs.com',
    'cn-zhangjiakou' = 'apigateway.cn-zhangjiakou.aliyuncs.com',
    'cn-huhehaote' = 'apigateway.cn-huhehaote.aliyuncs.com',
    'cn-wulanchabu' = 'apigateway.cn-wulanchabu.aliyuncs.com',
    'cn-hangzhou' = 'apigateway.cn-hangzhou.aliyuncs.com',
    'cn-shanghai' = 'apigateway.cn-shanghai.aliyuncs.com',
    'cn-shenzhen' = 'apigateway.cn-shenzhen.aliyuncs.com',
    'cn-heyuan' = 'apigateway.cn-heyuan.aliyuncs.com',
    'cn-guangzhou' = 'apigateway.cn-guangzhou.aliyuncs.com',
    'cn-chengdu' = 'apigateway.cn-chengdu.aliyuncs.com',
    'cn-hongkong' = 'apigateway.cn-hongkong.aliyuncs.com',
    'ap-northeast-1' = 'apigateway.ap-northeast-1.aliyuncs.com',
    'ap-southeast-1' = 'apigateway.ap-southeast-1.aliyuncs.com',
    'ap-southeast-2' = 'apigateway.ap-southeast-2.aliyuncs.com',
    'ap-southeast-3' = 'apigateway.ap-southeast-3.aliyuncs.com',
    'ap-southeast-5' = 'apigateway.ap-southeast-5.aliyuncs.com',
    'ap-southeast-6' = 'apigateway.ap-southeast-6.aliyuncs.com',
    'ap-southeast-7' = 'apigateway.ap-southeast-7.aliyuncs.com',
    'us-east-1' = 'apigateway.us-east-1.aliyuncs.com',
    'us-west-1' = 'apigateway.us-west-1.aliyuncs.com',
    'eu-west-1' = 'apigateway.eu-west-1.aliyuncs.com',
    'eu-central-1' = 'apigateway.eu-central-1.aliyuncs.com',
    'ap-south-1' = 'apigateway.ap-south-1.aliyuncs.com',
    'me-east-1' = 'apigateway.me-east-1.aliyuncs.com',
    'me-central-1' = 'apigateway.me-central-1.aliyuncs.com',
    'cn-hangzhou-finance' = 'apigateway.cn-hangzhou-finance.aliyuncs.com',
    'cn-shanghai-finance-1' = 'apigateway.cn-shanghai-finance-1.aliyuncs.com',
    'cn-shenzhen-finance-1' = 'apigateway.cn-shenzhen-finance-1.aliyuncs.com',
    'cn-north-2-gov-1' = 'apigateway.cn-north-2-gov-1.aliyuncs.com',
    'ap-northeast-2-pop' = 'apigateway.aliyuncs.com',
    'cn-beijing-finance-1' = 'apigateway.cn-beijing-finance-1.aliyuncs.com',
    'cn-beijing-finance-pop' = 'apigateway.aliyuncs.com',
    'cn-beijing-gov-1' = 'apigateway.aliyuncs.com',
    'cn-beijing-nu16-b01' = 'apigateway.aliyuncs.com',
    'cn-edge-1' = 'apigateway.aliyuncs.com',
    'cn-fujian' = 'apigateway.aliyuncs.com',
    'cn-haidian-cm12-c01' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-bj-b01' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-internal-prod-1' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-internal-test-1' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-internal-test-2' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-internal-test-3' = 'apigateway.aliyuncs.com',
    'cn-hangzhou-test-306' = 'apigateway.aliyuncs.com',
    'cn-hongkong-finance-pop' = 'apigateway.aliyuncs.com',
    'cn-huhehaote-nebula-1' = 'apigateway.aliyuncs.com',
    'cn-qingdao-nebula' = 'apigateway.aliyuncs.com',
    'cn-shanghai-et15-b01' = 'apigateway.aliyuncs.com',
    'cn-shanghai-et2-b01' = 'apigateway.aliyuncs.com',
    'cn-shanghai-inner' = 'apigateway.cn-shanghai-inner.aliyuncs.com',
    'cn-shanghai-internal-test-1' = 'apigateway.aliyuncs.com',
    'cn-shenzhen-inner' = 'apigateway.aliyuncs.com',
    'cn-shenzhen-st4-d01' = 'apigateway.aliyuncs.com',
    'cn-shenzhen-su18-b01' = 'apigateway.aliyuncs.com',
    'cn-wuhan' = 'apigateway.aliyuncs.com',
    'cn-yushanfang' = 'apigateway.aliyuncs.com',
    'cn-zhangbei' = 'apigateway.aliyuncs.com',
    'cn-zhangbei-na61-b01' = 'apigateway.aliyuncs.com',
    'cn-zhangjiakou-na62-a01' = 'apigateway.aliyuncs.com',
    'cn-zhengzhou-nebula-1' = 'apigateway.aliyuncs.com',
    'eu-west-1-oxs' = 'apigateway.aliyuncs.com',
    'rus-west-1-pop' = 'apigateway.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('cloudapi', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AbolishApiRequest {
  apiId?: string(name='ApiId', description='The ID of the specified API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='123'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='RELEASE'),
}

model AbolishApiResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
}

model AbolishApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AbolishApiResponseBody(name='body'),
}

/**
 * @summary Unpublishes a specified API from a specified runtime environment.
 *
 * @description *   This operation is intended for API providers and is the opposite of DeployApi.
 * *   An API can be unpublished from a specified runtime environment in under 5 seconds.
 * *   An unpublished API cannot be called in the specified runtime environment.
 *
 * @param request AbolishApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AbolishApiResponse
 */
async function abolishApiWithOptions(request: AbolishApiRequest, runtime: Util.RuntimeOptions): AbolishApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbolishApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unpublishes a specified API from a specified runtime environment.
 *
 * @description *   This operation is intended for API providers and is the opposite of DeployApi.
 * *   An API can be unpublished from a specified runtime environment in under 5 seconds.
 * *   An unpublished API cannot be called in the specified runtime environment.
 *
 * @param request AbolishApiRequest
 * @return AbolishApiResponse
 */
async function abolishApi(request: AbolishApiRequest): AbolishApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return abolishApiWithOptions(request, runtime);
}

model AddAccessControlListEntryRequest {
  aclEntrys?: string(name='AclEntrys', description='The ACL settings.

*   entry: the entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
*   comment: the description of the ACL.

> You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks.', example='[{\\\\"entry\\\\": \\\\"192.168.1.0/24\\\\", \\\\"comment\\\\": \\\\"test\\\\"}]'),
  aclId?: string(name='AclId', description='The ID of the access control list (ACL).

This parameter is required.', example='acl-bp1ohqkonqybecf4llbrc'),
  securityToken?: string(name='SecurityToken'),
}

model AddAccessControlListEntryResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
}

model AddAccessControlListEntryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddAccessControlListEntryResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Adds an IP address entry to the access control polocy of an instance.
 *
 * @param request AddAccessControlListEntryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddAccessControlListEntryResponse
 */
async function addAccessControlListEntryWithOptions(request: AddAccessControlListEntryRequest, runtime: Util.RuntimeOptions): AddAccessControlListEntryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclEntrys)) {
    query['AclEntrys'] = request.aclEntrys;
  }
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddAccessControlListEntry',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Adds an IP address entry to the access control polocy of an instance.
 *
 * @param request AddAccessControlListEntryRequest
 * @return AddAccessControlListEntryResponse
 */
async function addAccessControlListEntry(request: AddAccessControlListEntryRequest): AddAccessControlListEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAccessControlListEntryWithOptions(request, runtime);
}

model AddIpControlPolicyItemRequest {
  appId?: string(name='AppId', description='The restriction policy on app IDs for a specific policy. You can restrict app IDs only for whitelists. The IpControlType values of whitelists are ALLOW.

*   You can add only one app ID restriction policy at a time.
*   If this parameter is empty, no restriction is imposed on the app IDs.
*   If this parameter is not empty, there is restriction not only on IP addresses, but also on apps.
*   Please note that if this parameter is not empty and the security authentication method of the API is No Authentication, all API calls are restricted.
*   If this parameter is not empty for a blacklist, API Gateway automatically skips this parameter and sets only restriction on IP addresses. The IpControlType value of a blacklist is REFUSE.', example='1111111'),
  cidrIp?: string(name='CidrIp', description='The IP addresses or CIDR blocks involved in the policy. Separate multiple IP addresses or CIDR blocks with semicolons (;). You can specify a maximum of 10 IP addresses or CIDR blocks.

This parameter is required.', example='113.125.1.101;101.11.1.1'),
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.

This parameter is required.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='4223a10e-eed3-46a6-8b7c-23003f488153'),
}

model AddIpControlPolicyItemResponseBody = {
  policyItemId?: string(name='PolicyItemId', description='The ID of the policy. The ID is unique.', example='P151617000829241'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model AddIpControlPolicyItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddIpControlPolicyItemResponseBody(name='body'),
}

/**
 * @summary Adds a policy to an existing ACL.
 *
 * @description When you call this operation, note that:
 * *   This operation is intended for API providers.
 * *   An added policy immediately takes effect on all APIs that are bound to the access control list (ACL).
 * *   A maximum of 100 policies can be added to an ACL.
 *
 * @param request AddIpControlPolicyItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddIpControlPolicyItemResponse
 */
async function addIpControlPolicyItemWithOptions(request: AddIpControlPolicyItemRequest, runtime: Util.RuntimeOptions): AddIpControlPolicyItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.cidrIp)) {
    query['CidrIp'] = request.cidrIp;
  }
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddIpControlPolicyItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds a policy to an existing ACL.
 *
 * @description When you call this operation, note that:
 * *   This operation is intended for API providers.
 * *   An added policy immediately takes effect on all APIs that are bound to the access control list (ACL).
 * *   A maximum of 100 policies can be added to an ACL.
 *
 * @param request AddIpControlPolicyItemRequest
 * @return AddIpControlPolicyItemResponse
 */
async function addIpControlPolicyItem(request: AddIpControlPolicyItemRequest): AddIpControlPolicyItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return addIpControlPolicyItemWithOptions(request, runtime);
}

model AddTrafficSpecialControlRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='fa876ffb-caab-4f0a-93b3-3409f2fa5199'),
  specialKey?: string(name='SpecialKey', description='The ID of the app or Alibaba Cloud account. Specify this parameter based on the value of the **SpecialType** parameter. You can view your account ID on the [Account Management](https://account.console.aliyun.com/?spm=a2c4g.11186623.2.15.3f053654YpMPwo#/secure) page.

This parameter is required.', example='3382463'),
  specialType?: string(name='SpecialType', description='The type of the special throttling policy. Valid values:

*   **APP**
*   **USER**

This parameter is required.', example='APP'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the specified throttling policy.

This parameter is required.', example='tf123456'),
  trafficValue?: int32(name='TrafficValue', description='The special throttling value.

This parameter is required.', example='10000'),
}

model AddTrafficSpecialControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model AddTrafficSpecialControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTrafficSpecialControlResponseBody(name='body'),
}

/**
 * @summary Adds a custom special policy to a specified throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   If the input SpecialKey already exists, the previous configuration is overwritten. Use caution when calling this operation.
 * *   Special throttling policies must be added to an existing throttling policy, and can take effect on all the APIs to which the throttling policy is bound.
 *
 * @param request AddTrafficSpecialControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTrafficSpecialControlResponse
 */
async function addTrafficSpecialControlWithOptions(request: AddTrafficSpecialControlRequest, runtime: Util.RuntimeOptions): AddTrafficSpecialControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.specialKey)) {
    query['SpecialKey'] = request.specialKey;
  }
  if (!Util.isUnset(request.specialType)) {
    query['SpecialType'] = request.specialType;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  if (!Util.isUnset(request.trafficValue)) {
    query['TrafficValue'] = request.trafficValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddTrafficSpecialControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds a custom special policy to a specified throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   If the input SpecialKey already exists, the previous configuration is overwritten. Use caution when calling this operation.
 * *   Special throttling policies must be added to an existing throttling policy, and can take effect on all the APIs to which the throttling policy is bound.
 *
 * @param request AddTrafficSpecialControlRequest
 * @return AddTrafficSpecialControlResponse
 */
async function addTrafficSpecialControl(request: AddTrafficSpecialControlRequest): AddTrafficSpecialControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return addTrafficSpecialControlWithOptions(request, runtime);
}

model AssociateInstanceWithPrivateDNSRequest {
  instanceId?: string(name='InstanceId', description='The instance ID.

This parameter is required.', example='apigateway-hz-ead4f4b0bac8'),
  intranetDomains?: [ string ](name='IntranetDomains', description='The internal domain names included in the resolution.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model AssociateInstanceWithPrivateDNSShrinkRequest {
  instanceId?: string(name='InstanceId', description='The instance ID.

This parameter is required.', example='apigateway-hz-ead4f4b0bac8'),
  intranetDomainsShrink?: string(name='IntranetDomains', description='The internal domain names included in the resolution.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model AssociateInstanceWithPrivateDNSResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='03442A3D-3B7D-434C-8A95-A5FEB999B529'),
}

model AssociateInstanceWithPrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AssociateInstanceWithPrivateDNSResponseBody(name='body'),
}

/**
 * @summary Associates an internal domain name resolution with a dedicated instance.
 *
 * @description An internal domain name resolution can be associated only with a dedicated instance, not with a shared instance or shared instance cluster.
 *
 * @param tmpReq AssociateInstanceWithPrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AssociateInstanceWithPrivateDNSResponse
 */
async function associateInstanceWithPrivateDNSWithOptions(tmpReq: AssociateInstanceWithPrivateDNSRequest, runtime: Util.RuntimeOptions): AssociateInstanceWithPrivateDNSResponse {
  Util.validateModel(tmpReq);
  var request = new AssociateInstanceWithPrivateDNSShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.intranetDomains)) {
    request.intranetDomainsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.intranetDomains, 'IntranetDomains', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.intranetDomainsShrink)) {
    body['IntranetDomains'] = request.intranetDomainsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AssociateInstanceWithPrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Associates an internal domain name resolution with a dedicated instance.
 *
 * @description An internal domain name resolution can be associated only with a dedicated instance, not with a shared instance or shared instance cluster.
 *
 * @param request AssociateInstanceWithPrivateDNSRequest
 * @return AssociateInstanceWithPrivateDNSResponse
 */
async function associateInstanceWithPrivateDNS(request: AssociateInstanceWithPrivateDNSRequest): AssociateInstanceWithPrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return associateInstanceWithPrivateDNSWithOptions(request, runtime);
}

model AttachApiProductRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  apis?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.

This parameter is required.', example='551877242a4b4f3a84a56b7c3570e4a7'),
      stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
    }
  ](name='Apis', description='The APIs to be attached.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model AttachApiProductResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='BA20890E-75C7-41BC-9C8B-73276B58F550'),
}

model AttachApiProductResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachApiProductResponseBody(name='body'),
}

/**
 * @summary Attaches APIs to an API product. If the API product does not exist, the system automatically creates the API product.
 *
 * @param request AttachApiProductRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachApiProductResponse
 */
async function attachApiProductWithOptions(request: AttachApiProductRequest, runtime: Util.RuntimeOptions): AttachApiProductResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.apis)) {
    query['Apis'] = request.apis;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachApiProduct',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Attaches APIs to an API product. If the API product does not exist, the system automatically creates the API product.
 *
 * @param request AttachApiProductRequest
 * @return AttachApiProductResponse
 */
async function attachApiProduct(request: AttachApiProductRequest): AttachApiProductResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachApiProductWithOptions(request, runtime);
}

model AttachGroupPluginRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  pluginId?: string(name='PluginId', description='The ID of the plug-in to be bound.

This parameter is required.', example='05df2b52a3644a3a8b1935ab8ab59e9d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API is requested. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
}

model AttachGroupPluginResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model AttachGroupPluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachGroupPluginResponseBody(name='body'),
}

/**
 * @summary Attach plugin to API group.
 *
 * @param request AttachGroupPluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachGroupPluginResponse
 */
async function attachGroupPluginWithOptions(request: AttachGroupPluginRequest, runtime: Util.RuntimeOptions): AttachGroupPluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachGroupPlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Attach plugin to API group.
 *
 * @param request AttachGroupPluginRequest
 * @return AttachGroupPluginResponse
 */
async function attachGroupPlugin(request: AttachGroupPluginRequest): AttachGroupPluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachGroupPluginWithOptions(request, runtime);
}

model AttachPluginRequest {
  apiId?: string(name='ApiId', description='The number of the API to be bound.', example='8afff6c8c4c6447abb035812e4d66b65'),
  apiIds?: string(name='ApiIds', description='The number of the API to be operated. Separate multiple numbers with commas (,). A maximum of 100 numbers can be entered.', example='xxx'),
  groupId?: string(name='GroupId', description='The ID of the API group that contains the API to which the plug-in is to be bound.', example='285bb759342649a1b70c2093a772e087'),
  pluginId?: string(name='PluginId', description='The ID of the plug-in to be bound.

This parameter is required.', example='9a3f1a5279434f2ba74ccd91c295af9f'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE: the pre-release environment**
*   **TEST**

This parameter is required.', example='TEST'),
}

model AttachPluginResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model AttachPluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachPluginResponseBody(name='body'),
}

/**
 * @summary Binds a plug-in to an API.
 *
 * @description *   This operation is intended for API providers.
 * *   You can only bind plug-ins to published APIs.
 * *   The plug-in takes effect immediately after it is bound to an API.
 * *   If you bind a different plug-in to an API, this plug-in takes effect immediately.
 *
 * @param request AttachPluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachPluginResponse
 */
async function attachPluginWithOptions(request: AttachPluginRequest, runtime: Util.RuntimeOptions): AttachPluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachPlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a plug-in to an API.
 *
 * @description *   This operation is intended for API providers.
 * *   You can only bind plug-ins to published APIs.
 * *   The plug-in takes effect immediately after it is bound to an API.
 * *   If you bind a different plug-in to an API, this plug-in takes effect immediately.
 *
 * @param request AttachPluginRequest
 * @return AttachPluginResponse
 */
async function attachPlugin(request: AttachPluginRequest): AttachPluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachPluginWithOptions(request, runtime);
}

model BatchAbolishApisRequest {
  api?: [ 
    {
      apiUid?: string(name='ApiUid', description='The ID of the API.

This parameter is required.', example='994f72dcdaf04af0b38022c65fdbd1ac'),
      groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='ced5ab777f7b440398ea70e4470124de'),
      stageId?: string(name='StageId', description='The ID of the environment.', example='979fd16250644d5b82173534f465ac77'),
      stageName?: string(name='StageName', description='The name of the environment.', example='RELEASE'),
    }
  ](name='Api', description='The APIs that you want to operate.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model BatchAbolishApisResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the operation.', example='f7834d74be4e41aa8e607b0fafae9b33'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E7FE7172-AA75-5880-B6F7-C00893E9BC06'),
}

model BatchAbolishApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchAbolishApisResponseBody(name='body'),
}

/**
 * @summary Unpublishes multiple published APIs at a time.
 *
 * @param request BatchAbolishApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchAbolishApisResponse
 */
async function batchAbolishApisWithOptions(request: BatchAbolishApisRequest, runtime: Util.RuntimeOptions): BatchAbolishApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.api)) {
    query['Api'] = request.api;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchAbolishApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unpublishes multiple published APIs at a time.
 *
 * @param request BatchAbolishApisRequest
 * @return BatchAbolishApisResponse
 */
async function batchAbolishApis(request: BatchAbolishApisRequest): BatchAbolishApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchAbolishApisWithOptions(request, runtime);
}

model BatchDeployApisRequest {
  api?: [ 
    {
      apiUid?: string(name='ApiUid', description='The API ID.

This parameter is required.', example='2b35dd68345b472f8051647306a16415'),
      groupId?: string(name='GroupId', description='The API group ID.

This parameter is required.', example='b4f5c342b8bc4ef88ccda0332402e0fa'),
    }
  ](name='Api', description='The APIs that you want to publish.'),
  description?: string(name='Description', description='The description.

This parameter is required.', example='test'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**
*   PRE: the pre-release environment

This parameter is required.', example='RELEASE'),
}

model BatchDeployApisResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the operation.', example='2a322599-8e38-428a-a306-9b21ea2129bf'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E7FE7172-AA75-5880-B6F7-C00893E9BC06'),
}

model BatchDeployApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchDeployApisResponseBody(name='body'),
}

/**
 * @summary Publishes multiple APIs at a time.
 *
 * @param request BatchDeployApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchDeployApisResponse
 */
async function batchDeployApisWithOptions(request: BatchDeployApisRequest, runtime: Util.RuntimeOptions): BatchDeployApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.api)) {
    query['Api'] = request.api;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchDeployApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Publishes multiple APIs at a time.
 *
 * @param request BatchDeployApisRequest
 * @return BatchDeployApisResponse
 */
async function batchDeployApis(request: BatchDeployApisRequest): BatchDeployApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchDeployApisWithOptions(request, runtime);
}

model CreateAccessControlListRequest {
  aclName?: string(name='AclName', description='The name of the ACL. The name must be 1 to 30 characters in length, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name must be unique within the region.

This parameter is required.', example='testAcl'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP protocol version of the ACL. Valid values:

*   **IPv4**
*   **IPv6**', example='ipv4'),
  securityToken?: string(name='SecurityToken'),
}

model CreateAccessControlListResponseBody = {
  aclId?: string(name='AclId', description='The ACL ID.', example='acl-bp1uqwgwmkbutnzq2r59z'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model CreateAccessControlListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAccessControlListResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Creates an Access Control List (ACL). Each user is allowed to create five ACLs in each region.
 *
 * @param request CreateAccessControlListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAccessControlListResponse
 */
async function createAccessControlListWithOptions(request: CreateAccessControlListRequest, runtime: Util.RuntimeOptions): CreateAccessControlListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAccessControlList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Creates an Access Control List (ACL). Each user is allowed to create five ACLs in each region.
 *
 * @param request CreateAccessControlListRequest
 * @return CreateAccessControlListResponse
 */
async function createAccessControlList(request: CreateAccessControlListRequest): CreateAccessControlListResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAccessControlListWithOptions(request, runtime);
}

model CreateApiRequest {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='The type of the two-way communication API.

*   **COMMON**: normal APIs
*   **REGISTER**: registered APIs
*   **UNREGISTER**: unregistered APIs
*   **NOTIFY**: downstream notification APIs', example='HmacSHA256'),
  apiName?: string(name='ApiName', description='The name of the API that you want to create. The name must be unique within the API group. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (_).

This parameter is required.', example='ApiName'),
  appCodeAuthType?: string(name='AppCodeAuthType', description='The IDof the backend service', example='HEADER'),
  authType?: string(name='AuthType', description='The configuration items of API requests sent by the consumer to API Gateway.

For more information, see [RequestConfig](https://help.aliyun.com/document_detail/43985.html).', example='APP'),
  backendEnable?: boolean(name='BackendEnable', description='Specifies whether to enable backend services.', example='true'),
  backendId?: string(name='BackendId', description='Specifies whether to enable backend services.', example='a0305308908c4740aba9cbfd63ba99b7'),
  constantParameters?: string(name='ConstantParameters'),
  description?: string(name='Description', description='The description of the API. The description can be up to 180 characters in length.', example='Api description'),
  disableInternet?: boolean(name='DisableInternet', description='If **AuthType** is set to **APP**, the valid values are:

*   **DEFAULT**: The default value that is used if no other values are passed. This value means that the setting of the group is used.
*   **DISABLE**: The authentication is disabled.
*   **HEADER**: AppCode can be placed in the Header parameter for authentication.
*   **HEADER_QUERY**: AppCode can be placed in the Header or Query parameter for authentication.', example='true'),
  errorCodeSamples?: string(name='ErrorCodeSamples'),
  failResultSample?: string(name='FailResultSample'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to set **DisableInternet** to **true** to limit API calls to within the VPC.
*   If you set **DisableInternet** to **false**, the limit is lifted. The default value is false when you create an API.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  openIdConnectConfig?: string(name='OpenIdConnectConfig', description='If the **AuthType** is **APP** authentication, you need to pass this value to specify the signature algorithm. If you do not specify this parameter, the default value HmacSHA256 is used. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='{\\\\"openIdApiType\\\\":null,\\\\"idTokenParamName\\\\":null,\\\\"publicKeyId\\\\":null,\\\\"publicKey\\\\":null}'),
  requestConfig?: string(name='RequestConfig', description='The configuration items of API requests sent by API Gateway to the backend service.

For more information, see [ServiceConfig](https://help.aliyun.com/document_detail/43987.html).

This parameter is required.', example='{"RequestProtocol":"HTTP","RequestHttpMethod":"GET","RequestPath":"/v3/getUserTest/[userId]","BodyFormat":"FORM","PostBodyDescription":""}'),
  requestParameters?: string(name='RequestParameters'),
  resultBodyModel?: string(name='ResultBodyModel', description='*   Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If you set **ForceNonceCheck** to **false**, the check is not performed. The default value is false when you create an API.', example='{}'),
  resultDescriptions?: string(name='ResultDescriptions'),
  resultSample?: string(name='ResultSample'),
  resultType?: string(name='ResultType', description='The sample response from the backend service.', example='HTML'),
  securityToken?: string(name='SecurityToken'),
  serviceConfig?: string(name='ServiceConfig', description='The parameters of API requests sent by the consumer to API Gateway.

For more information, see [RequestParameter](https://help.aliyun.com/document_detail/43986.html).

This parameter is required.', example='{"ServiceProtocol":"HTTP","ServiceHttpMethod":"GET","ServiceAddress":"http://www.customerdomain.com","ServiceTimeout":"1000","ServicePath":"/v3/getUserTest/[userId]"}'),
  serviceParameters?: string(name='ServiceParameters'),
  serviceParametersMap?: string(name='ServiceParametersMap'),
  systemParameters?: string(name='SystemParameters'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='env'),
      value?: string(name='Value', description='The value of the tag.', example='value'),
    }
  ](name='Tag', description='The list of tags.'),
  visibility?: string(name='Visibility', description='Specifies whether to make the API public. Valid values:

*   **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.
*   **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.

This parameter is required.', example='PUBLIC'),
  webSocketApiType?: string(name='WebSocketApiType', description='The return description of the API.', example='COMMON'),
}

model CreateApiResponseBody = {
  apiId?: string(name='ApiId', description='The ID of the API.', example='8afff6c8c4c6447abb035812e4d66b65'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
}

model CreateApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApiResponseBody(name='body'),
}

/**
 * @summary Creates an API.
 *
 * @description *   This operation is intended for API providers.
 * *   The name of an API must be unique within an API group.
 * *   A request path must be unique within an API group.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApiResponse
 */
async function createApiWithOptions(request: CreateApiRequest, runtime: Util.RuntimeOptions): CreateApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.allowSignatureMethod)) {
    query['AllowSignatureMethod'] = request.allowSignatureMethod;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appCodeAuthType)) {
    query['AppCodeAuthType'] = request.appCodeAuthType;
  }
  if (!Util.isUnset(request.authType)) {
    query['AuthType'] = request.authType;
  }
  if (!Util.isUnset(request.backendEnable)) {
    query['BackendEnable'] = request.backendEnable;
  }
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.disableInternet)) {
    query['DisableInternet'] = request.disableInternet;
  }
  if (!Util.isUnset(request.forceNonceCheck)) {
    query['ForceNonceCheck'] = request.forceNonceCheck;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.openIdConnectConfig)) {
    query['OpenIdConnectConfig'] = request.openIdConnectConfig;
  }
  if (!Util.isUnset(request.requestConfig)) {
    query['RequestConfig'] = request.requestConfig;
  }
  if (!Util.isUnset(request.resultBodyModel)) {
    query['ResultBodyModel'] = request.resultBodyModel;
  }
  if (!Util.isUnset(request.resultType)) {
    query['ResultType'] = request.resultType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.serviceConfig)) {
    query['ServiceConfig'] = request.serviceConfig;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.visibility)) {
    query['Visibility'] = request.visibility;
  }
  if (!Util.isUnset(request.webSocketApiType)) {
    query['WebSocketApiType'] = request.webSocketApiType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.constantParameters)) {
    body['ConstantParameters'] = request.constantParameters;
  }
  if (!Util.isUnset(request.errorCodeSamples)) {
    body['ErrorCodeSamples'] = request.errorCodeSamples;
  }
  if (!Util.isUnset(request.failResultSample)) {
    body['FailResultSample'] = request.failResultSample;
  }
  if (!Util.isUnset(request.requestParameters)) {
    body['RequestParameters'] = request.requestParameters;
  }
  if (!Util.isUnset(request.resultDescriptions)) {
    body['ResultDescriptions'] = request.resultDescriptions;
  }
  if (!Util.isUnset(request.resultSample)) {
    body['ResultSample'] = request.resultSample;
  }
  if (!Util.isUnset(request.serviceParameters)) {
    body['ServiceParameters'] = request.serviceParameters;
  }
  if (!Util.isUnset(request.serviceParametersMap)) {
    body['ServiceParametersMap'] = request.serviceParametersMap;
  }
  if (!Util.isUnset(request.systemParameters)) {
    body['SystemParameters'] = request.systemParameters;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an API.
 *
 * @description *   This operation is intended for API providers.
 * *   The name of an API must be unique within an API group.
 * *   A request path must be unique within an API group.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateApiRequest
 * @return CreateApiResponse
 */
async function createApi(request: CreateApiRequest): CreateApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return createApiWithOptions(request, runtime);
}

model CreateApiGroupRequest {
  basePath?: string(name='BasePath', example='/qqq'),
  description?: string(name='Description', example='The weather informations.'),
  groupName?: string(name='GroupName', description='This parameter is required.', example='Weather'),
  instanceId?: string(name='InstanceId', example='apigateway-cn-v6419k43xxxxx'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', example='key'),
      value?: string(name='Value', example='value'),
    }
  ](name='Tag', example='Key， Value'),
}

model CreateApiGroupResponseBody = {
  basePath?: string(name='BasePath', example='/qqq'),
  description?: string(name='Description', example='The weather informations'),
  groupId?: string(name='GroupId', example='523e8dc7bbe04613b5b1d726c2a7xx'),
  groupName?: string(name='GroupName', example='Weather'),
  instanceId?: string(name='InstanceId', example='apigateway-cn-v6419k43xxxxx'),
  instanceType?: string(name='InstanceType', example='VPC_SHARED'),
  requestId?: string(name='RequestId', example='FF3B7D81-66AE-47E0-BF69-157DCF187514'),
  subDomain?: string(name='SubDomain', example='523e8dc7bbe04613b5b1d726xxxxxxxx-cn-hangzhou.alicloudapi.com'),
  tagStatus?: boolean(name='TagStatus', example='True'),
}

model CreateApiGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApiGroupResponseBody(name='body'),
}

/**
 * @summary 创建API分组
 *
 * @param request CreateApiGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApiGroupResponse
 */
async function createApiGroupWithOptions(request: CreateApiGroupRequest, runtime: Util.RuntimeOptions): CreateApiGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.basePath)) {
    query['BasePath'] = request.basePath;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateApiGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建API分组
 *
 * @param request CreateApiGroupRequest
 * @return CreateApiGroupResponse
 */
async function createApiGroup(request: CreateApiGroupRequest): CreateApiGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createApiGroupWithOptions(request, runtime);
}

model CreateApiStageVariableRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageId?: string(name='StageId', description='The ID of the runtime environment.

This parameter is required.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
  stageRouteModel?: string(name='StageRouteModel', description='The routing model of the environment.', example='{
    "location": "HEAD",
    "parameterCatalog": "CUSTOM",
    "parameterType": "String",
    "serviceParameterName": "TestConstant",
    "routeMatchSymbol": "IN",
    "routeRules": [
        {
            "conditionValue": "aaa,bbb",
            "resultValue": "apigateway-test.com"
        }
    ]
}', deprecated=true),
  supportRoute?: boolean(name='SupportRoute', description='Specifies whether routing is supported.', example='true'),
  variableName?: string(name='VariableName', description='The name of the variable to be added. This parameter is case-sensitive.

This parameter is required.', example='serverName'),
  variableValue?: string(name='VariableValue', description='The value of the variable.', example='api.domain.com'),
}

model CreateApiStageVariableResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='03442A3D-3B7D-434C-8A95-A5FEB999B529'),
}

model CreateApiStageVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApiStageVariableResponseBody(name='body'),
}

/**
 * @summary Adds a variable to an environment.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request CreateApiStageVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApiStageVariableResponse
 */
async function createApiStageVariableWithOptions(request: CreateApiStageVariableRequest, runtime: Util.RuntimeOptions): CreateApiStageVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageId)) {
    query['StageId'] = request.stageId;
  }
  if (!Util.isUnset(request.stageRouteModel)) {
    query['StageRouteModel'] = request.stageRouteModel;
  }
  if (!Util.isUnset(request.supportRoute)) {
    query['SupportRoute'] = request.supportRoute;
  }
  if (!Util.isUnset(request.variableName)) {
    query['VariableName'] = request.variableName;
  }
  if (!Util.isUnset(request.variableValue)) {
    query['VariableValue'] = request.variableValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateApiStageVariable',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds a variable to an environment.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request CreateApiStageVariableRequest
 * @return CreateApiStageVariableResponse
 */
async function createApiStageVariable(request: CreateApiStageVariableRequest): CreateApiStageVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return createApiStageVariableWithOptions(request, runtime);
}

model CreateAppRequest {
  appCode?: string(name='AppCode', description='The AppCode of the application.', example='3aaf905a0a1f4f0eabc6d891dfa08afc'),
  appKey?: string(name='AppKey', description='The key of the application that is used to make an API call.', example='60030986'),
  appName?: string(name='AppName', description='The name of the application. The name must be 4 to 26 characters in length. The name can contain letters, digits, and underscores (_), and must start with a letter.

This parameter is required.', example='CreateAppTest'),
  appSecret?: string(name='AppSecret', description='The password of the application.', example='nzyNqFkRWB2uLw86'),
  description?: string(name='Description', description='The description of the application. The description can be up to 180 characters in length.', example='test'),
  extend?: string(name='Extend', description='The extended information.', example='110210264071'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

Valid values of n: `[1, 20]`.', example='env'),
      value?: string(name='Value', description='The value of the tag.

Valid values of n: `[1, 20]`. If the parameter has a value, you must specify a value for the tag key with the same N as tag.N.Key. Otherwise, an error is reported.', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model CreateAppResponseBody = {
  appId?: long(name='AppId', description='The unique ID of the application.', example='20112314518278'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='BA20890E-75C7-41BC-9C8B-73276B58F550'),
  tagStatus?: boolean(name='TagStatus', description='Indicates whether the tag exists. If the value is **true**, the tag exists. If the value is **false**, the tag does not exist.', example='false'),
}

model CreateAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppResponseBody(name='body'),
}

/**
 * @summary Creates an application for calling APIs in API Gateway.
 *
 * @description *   This operation is intended for API callers.
 * *   Each application has a key-value pair which is used for identity verification when you call an API.
 * *   An application must be authorized to call an API.
 * *   Each application has only one key-value pair, which can be reset if the pair is leaked.
 * *   A maximum of 1,000 applications can be created for each Alibaba Cloud account.
 * *   You can call this operation up to 50 times per second per account.
 *
 * @param request CreateAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppResponse
 */
async function createAppWithOptions(request: CreateAppRequest, runtime: Util.RuntimeOptions): CreateAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appSecret)) {
    query['AppSecret'] = request.appSecret;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.extend)) {
    query['Extend'] = request.extend;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an application for calling APIs in API Gateway.
 *
 * @description *   This operation is intended for API callers.
 * *   Each application has a key-value pair which is used for identity verification when you call an API.
 * *   An application must be authorized to call an API.
 * *   Each application has only one key-value pair, which can be reset if the pair is leaked.
 * *   A maximum of 1,000 applications can be created for each Alibaba Cloud account.
 * *   You can call this operation up to 50 times per second per account.
 *
 * @param request CreateAppRequest
 * @return CreateAppResponse
 */
async function createApp(request: CreateAppRequest): CreateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppWithOptions(request, runtime);
}

model CreateAppCodeRequest {
  appCode?: string(name='AppCode', description='The application AppCode.', example='3aaf905a0a1f4f0eabc6d891dfa08afc'),
  appId?: string(name='AppId', description='The application ID.

This parameter is required.', example='111203109'),
}

model CreateAppCodeResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='418DAAE7-A0C2-5E9C-ADFF-4CD14A474F88'),
}

model CreateAppCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppCodeResponseBody(name='body'),
}

/**
 * @summary Adds an AppCode to an application.
 *
 * @param request CreateAppCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppCodeResponse
 */
async function createAppCodeWithOptions(request: CreateAppCodeRequest, runtime: Util.RuntimeOptions): CreateAppCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppCode',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds an AppCode to an application.
 *
 * @param request CreateAppCodeRequest
 * @return CreateAppCodeResponse
 */
async function createAppCode(request: CreateAppCodeRequest): CreateAppCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppCodeWithOptions(request, runtime);
}

model CreateAppKeyRequest {
  appId?: string(name='AppId', description='The application ID.

This parameter is required.', example='111053351'),
  appKey?: string(name='AppKey', description='The application AppKey.', example='204203237'),
  appSecret?: string(name='AppSecret', description='The application AppSecret.', example='6f0a4ad7918a4b41a57fc087d5b066d0'),
}

model CreateAppKeyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='5D524309-6BED-5BB4-A735-F7D9F98B7B88'),
}

model CreateAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppKeyResponseBody(name='body'),
}

/**
 * @summary Adds an AppKey and AppSecret pair to an application.
 *
 * @param request CreateAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppKeyResponse
 */
async function createAppKeyWithOptions(request: CreateAppKeyRequest, runtime: Util.RuntimeOptions): CreateAppKeyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.appSecret)) {
    query['AppSecret'] = request.appSecret;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppKey',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds an AppKey and AppSecret pair to an application.
 *
 * @param request CreateAppKeyRequest
 * @return CreateAppKeyResponse
 */
async function createAppKey(request: CreateAppKeyRequest): CreateAppKeyResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppKeyWithOptions(request, runtime);
}

model CreateBackendRequest {
  backendName?: string(name='BackendName', description='The name of the backend service.

This parameter is required.', example='testBackendService'),
  backendType?: string(name='BackendType', description='The type of the backend service.

This parameter is required.', example='HTTP'),
  createEventBridgeServiceLinkedRole?: boolean(name='CreateEventBridgeServiceLinkedRole', description='Specifies to create a EventBridge service-linked role.', example='true'),
  createSlr?: boolean(name='CreateSlr', description='Specifies to create a service-linked role.', example='true'),
  description?: string(name='Description', description='The description.', example='release data api 411055691504981'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='key'),
      value?: string(name='Value', description='The value of the tag.', example='123'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
}

model CreateBackendResponseBody = {
  backendId?: string(name='BackendId', description='The ID of the backend service.', example='0d105f80a8f340408bd34954d4e4ff22'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='66D84355-164D-53ED-81FF-03DCF181DE24'),
}

model CreateBackendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBackendResponseBody(name='body'),
}

/**
 * @summary Creates a backend service in API Gateway.
 *
 * @param request CreateBackendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBackendResponse
 */
async function createBackendWithOptions(request: CreateBackendRequest, runtime: Util.RuntimeOptions): CreateBackendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendName)) {
    query['BackendName'] = request.backendName;
  }
  if (!Util.isUnset(request.backendType)) {
    query['BackendType'] = request.backendType;
  }
  if (!Util.isUnset(request.createEventBridgeServiceLinkedRole)) {
    query['CreateEventBridgeServiceLinkedRole'] = request.createEventBridgeServiceLinkedRole;
  }
  if (!Util.isUnset(request.createSlr)) {
    query['CreateSlr'] = request.createSlr;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBackend',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a backend service in API Gateway.
 *
 * @param request CreateBackendRequest
 * @return CreateBackendResponse
 */
async function createBackend(request: CreateBackendRequest): CreateBackendResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBackendWithOptions(request, runtime);
}

model CreateBackendModelRequest {
  backendId?: string(name='BackendId', example='34e94fcd3e2e47a49824a89b8f92cb5e'),
  backendModelData?: string(name='BackendModelData', example='{\\\\"ServiceAddress\\\\":\\\\"http://apigateway-echo-redux.alicloudapi.com:8080\\\\"}'),
  backendType?: string(name='BackendType', example='HTTP'),
  description?: string(name='Description', example='model description'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', example='TEST'),
}

model CreateBackendModelResponseBody = {
  backendModelId?: string(name='BackendModelId', example='4be6b110b7aa40b0bf0c83cc00b3bd86'),
  requestId?: string(name='RequestId', example='64411ECF-FAF7-5E3C-BA7B-E4A1F15A28CA'),
}

model CreateBackendModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateBackendModelResponseBody(name='body'),
}

/**
 * @summary 创建后端服务在环境上的配置
 *
 * @param request CreateBackendModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateBackendModelResponse
 */
async function createBackendModelWithOptions(request: CreateBackendModelRequest, runtime: Util.RuntimeOptions): CreateBackendModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.backendModelData)) {
    query['BackendModelData'] = request.backendModelData;
  }
  if (!Util.isUnset(request.backendType)) {
    query['BackendType'] = request.backendType;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateBackendModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建后端服务在环境上的配置
 *
 * @param request CreateBackendModelRequest
 * @return CreateBackendModelResponse
 */
async function createBackendModel(request: CreateBackendModelRequest): CreateBackendModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBackendModelWithOptions(request, runtime);
}

model CreateDatasetRequest {
  datasetName?: string(name='DatasetName', description='The name of the dataset.

This parameter is required.', example='DatasetName'),
  datasetType?: string(name='DatasetType', description='The type of the dataset. Valid values:

* JWT_BLOCKING: a JSON Web Token (JWT) blacklist
* IP_WHITELIST_CIDR : an IP address whitelist
* PARAMETER_ACCESS : parameter-based access control

This parameter is required.', example='JWT_BLOCKING'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='env'),
      value?: string(name='Value', description='The value of the tag.', example='123'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
}

model CreateDatasetResponseBody = {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.', example='a25a6589b2584ff490e891cc********'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4173F95B-360C-460C-9F6C-4A96********'),
}

model CreateDatasetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDatasetResponseBody(name='body'),
}

/**
 * @summary Creates a custom dataset.
 *
 * @param request CreateDatasetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDatasetResponse
 */
async function createDatasetWithOptions(request: CreateDatasetRequest, runtime: Util.RuntimeOptions): CreateDatasetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetName)) {
    query['DatasetName'] = request.datasetName;
  }
  if (!Util.isUnset(request.datasetType)) {
    query['DatasetType'] = request.datasetType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDataset',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a custom dataset.
 *
 * @param request CreateDatasetRequest
 * @return CreateDatasetResponse
 */
async function createDataset(request: CreateDatasetRequest): CreateDatasetResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDatasetWithOptions(request, runtime);
}

model CreateDatasetItemRequest {
  datasetId?: string(name='DatasetId', description='This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  description?: string(name='Description'),
  expiredTime?: string(name='ExpiredTime', example='2022-09-22T12:00:00Z'),
  securityToken?: string(name='SecurityToken'),
  value?: string(name='Value', description='This parameter is required.', example='106.43.XXX.XXX'),
}

model CreateDatasetItemResponseBody = {
  datasetItemId?: string(name='DatasetItemId', example='5045****'),
  requestId?: string(name='RequestId', example='8A5E2053-4D9F-5280-B7A9-D357********'),
}

model CreateDatasetItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDatasetItemResponseBody(name='body'),
}

/**
 * @summary 创建自定义数据集条目
 *
 * @param request CreateDatasetItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDatasetItemResponse
 */
async function createDatasetItemWithOptions(request: CreateDatasetItemRequest, runtime: Util.RuntimeOptions): CreateDatasetItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.expiredTime)) {
    query['ExpiredTime'] = request.expiredTime;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDatasetItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建自定义数据集条目
 *
 * @param request CreateDatasetItemRequest
 * @return CreateDatasetItemResponse
 */
async function createDatasetItem(request: CreateDatasetItemRequest): CreateDatasetItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDatasetItemWithOptions(request, runtime);
}

model CreateInstanceRequest {
  autoPay?: boolean(name='AutoPay', description='Whether to automatically pay when renewing. Value:

- True: Automatic payment. Please ensure that your account has sufficient balance.
- False: Console manual payment. The specific operation is to log in to the console, select Expenses in the upper right corner, enter the Expense Center, and find the target order in Order Management to make payment.

Default value: False.', example='false'),
  chargeType?: string(name='ChargeType', description='The billing method of the instance. Valid values: PostPaid (pay-as-you-go) and PrePaid (subscription).

This parameter is required.', example='PostPaid
PrePaid'),
  duration?: int32(name='Duration', description='The subscription duration of the instance.

*   If PricingCycle is set to **Month**, set this parameter to an integer ranges from **1** to **9**.
*   If PricingCycle is set to **Year**, set this parameter to an integer ranges from **1** to **3**.

>  This parameter is valid and required only if the ChargeType parameter is set to **PrePaid**.', example='1'),
  httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS policy.', example='HTTPS2_TLS1_2'),
  instanceCidr?: string(name='InstanceCidr', description='The CIDR block of the VPC integration instance.

*   192.168.0.0/16
*   172.16.0.0/12

**

**Warning** The VPC integration instance is connected to the specified CIDR block. Plan your CIDR block carefully to prevent overlaps with the private IP addresses of cloud services.

>  This parameter is in invitational preview and not available for public use.', example='172.16.0.0/12'),
  instanceName?: string(name='InstanceName', description='Instance Name

This parameter is required.', example='ApigatewayInstance'),
  instanceSpec?: string(name='InstanceSpec', description='Instance specifications

This parameter is required.', example='api.s1.small'),
  instanceType?: string(name='InstanceType', description='The type of the dedicated instance. Valid values:

*   vpc_connect: a VPC integration instance
*   normal: a conventional dedicated instance

>  This parameter is in invitational preview and not available for public use.', example='vpc_connect'),
  pricingCycle?: string(name='PricingCycle', description='The unit of the subscription duration of the subscription instance. Valid values:

*   **year**
*   **month**

>  This parameter is required if the ChargeType parameter is set to Prepaid.', example='Month'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='test1'),
      value?: string(name='Value', description='The tag value.', example='v1'),
    }
  ](name='Tag', description='The tags that you want to add to the instance.'),
  token?: string(name='Token', description='Passwords are used to prevent duplicate requests from being submitted, please do not reuse them.

This parameter is required.', example='c20d86c4-1eb3-4d0b-afe9-c586df1e2136'),
  userVpcId?: string(name='UserVpcId', description='The ID of the user\\\\"s VPC to be connected by the VPC integration instance.

>  This parameter is in invitational preview and not available for public use.', example='vpc-m5eo7khlb4h4f8y9egsdg'),
  zoneId?: string(name='ZoneId', description='The zone in which you want to create the instance. This parameter is required for a conventional dedicated instance and optional for a virtual private cloud (VPC) integration instance.', example='cn-beijing-MAZ3(c,e)'),
  zoneVSwitchSecurityGroup?: [ 
    {
      cidrBlock?: string(name='CidrBlock', description='The IPv4 CIDR block for the vSwitch.', example='192.168.9.0/24'),
      securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group. Services in the same security group can access each other.', example='sg-2ze2ql9nozv8q7kmlt6e'),
      vSwitchId?: string(name='VSwitchId', description='The vSwitch ID.', example='vsw-0xi349n11cxogmvm866tb'),
      zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-beijing-c'),
    }
  ](name='ZoneVSwitchSecurityGroup', description='The network information when the instance is a VPC integration instance, such as the zone, vSwitch, and security group.

>  This parameter is in invitational preview and not available for public use.'),
}

model CreateInstanceResponseBody = {
  instanceId?: string(name='InstanceId', description='Instance ID', example='apigateway-hz-b3c5dadd5***'),
  requestId?: string(name='RequestId', description='Request ID', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
  tagStatus?: boolean(name='TagStatus', description='Indicates whether the tag exists. Valid values: **true** and **false**.', example='True'),
}

model CreateInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateInstanceResponseBody(name='body'),
}

/**
 * @summary Creates an API Gateway instance.
 *
 * @param request CreateInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateInstanceResponse
 */
async function createInstanceWithOptions(request: CreateInstanceRequest, runtime: Util.RuntimeOptions): CreateInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.chargeType)) {
    query['ChargeType'] = request.chargeType;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.httpsPolicy)) {
    query['HttpsPolicy'] = request.httpsPolicy;
  }
  if (!Util.isUnset(request.instanceCidr)) {
    query['InstanceCidr'] = request.instanceCidr;
  }
  if (!Util.isUnset(request.instanceName)) {
    query['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.instanceSpec)) {
    query['InstanceSpec'] = request.instanceSpec;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  if (!Util.isUnset(request.userVpcId)) {
    query['UserVpcId'] = request.userVpcId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  if (!Util.isUnset(request.zoneVSwitchSecurityGroup)) {
    query['ZoneVSwitchSecurityGroup'] = request.zoneVSwitchSecurityGroup;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateInstance',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an API Gateway instance.
 *
 * @param request CreateInstanceRequest
 * @return CreateInstanceResponse
 */
async function createInstance(request: CreateInstanceRequest): CreateInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createInstanceWithOptions(request, runtime);
}

model CreateIntranetDomainRequest {
  groupId?: string(name='GroupId', description='The custom domain name.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
}

model CreateIntranetDomainResponseBody = {
  domainName?: string(name='DomainName', description='The ID of the request.', example='api.demo.com'),
  requestId?: string(name='RequestId', description='auditing', example='20D942A5-EDC6-5DA3-93F9-257888399E22'),
}

model CreateIntranetDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateIntranetDomainResponseBody(name='body'),
}

/**
 * @summary 创建内网域名
 *
 * @param request CreateIntranetDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateIntranetDomainResponse
 */
async function createIntranetDomainWithOptions(request: CreateIntranetDomainRequest, runtime: Util.RuntimeOptions): CreateIntranetDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateIntranetDomain',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建内网域名
 *
 * @param request CreateIntranetDomainRequest
 * @return CreateIntranetDomainResponse
 */
async function createIntranetDomain(request: CreateIntranetDomainRequest): CreateIntranetDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return createIntranetDomainWithOptions(request, runtime);
}

model CreateIpControlRequest {
  description?: string(name='Description', description='The description. The description can be up to 200 characters in length.', example='test'),
  ipControlName?: string(name='IpControlName', description='The name of the ACL. The name must be 4 to 50 characters in length, and can contain letters, digits, and underscores (_). The name cannot start with an underscore (_).``

This parameter is required.', example='controlNameTest'),
  ipControlPolicys?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application that is restricted by the policy. You can configure the AppId parameter only when the value of the IpControlType parameter is ALLOW.

*   You can add only one application ID at a time.
*   If this parameter is empty, no applications are restricted.
*   If this parameter is not empty, not only IP addresses but also applications are restricted.
*   If this parameter is not empty and no security authentication method is specified for the API, all API calls are restricted.
*   If the value of the IpControlType parameter is REFUSE and the AppId parameter is not empty, API Gateway automatically ignores the AppId parameter and restricts only the IP addresses.
*   Valid values of N in IpControlPolicys.N: `[1,100]`.', example='11111'),
      cidrIp?: string(name='CidrIp', description='The IP address or CIDR block involved in a policy.

*   If you want to specify a policy when you create an ACL, this parameter is required.
*   The IP address or CIDR block that is defined in each policy. Separate multiple IP addresses or CIDR blocks with semicolons (;). You can add a maximum of 10 IP addresses or CIDR blocks.
*   Valid values of N in IpControlPolicys.N: `[1,100]`.', example='114.1.1.0/24'),
    }
  ](name='IpControlPolicys', description='The information about the policies. The information is an array of ipcontrolpolicys data.'),
  ipControlType?: string(name='IpControlType', description='The type of the ACL. Valid values:

*   **ALLOW**: an IP address whitelist
*   **REFUSE**: an IP address blacklist

This parameter is required.', example='ALLOW'),
  securityToken?: string(name='SecurityToken'),
}

model CreateIpControlResponseBody = {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
}

model CreateIpControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateIpControlResponseBody(name='body'),
}

/**
 * @summary Creates an access control list (ACL) in a region.
 *
 * @description *   This operation is intended for API providers.
 * *   An ACL must be bound to an API to take effect. After an ACL is bound to an API, the ACL takes effect on the API immediately.
 * *   You can add policies to an ACL when you create the ACL.
 * *   If an ACL does not have any policy, the ACL is ineffective.
 *
 * @param request CreateIpControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateIpControlResponse
 */
async function createIpControlWithOptions(request: CreateIpControlRequest, runtime: Util.RuntimeOptions): CreateIpControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.ipControlName)) {
    query['IpControlName'] = request.ipControlName;
  }
  if (!Util.isUnset(request.ipControlPolicys)) {
    query['IpControlPolicys'] = request.ipControlPolicys;
  }
  if (!Util.isUnset(request.ipControlType)) {
    query['IpControlType'] = request.ipControlType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateIpControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an access control list (ACL) in a region.
 *
 * @description *   This operation is intended for API providers.
 * *   An ACL must be bound to an API to take effect. After an ACL is bound to an API, the ACL takes effect on the API immediately.
 * *   You can add policies to an ACL when you create the ACL.
 * *   If an ACL does not have any policy, the ACL is ineffective.
 *
 * @param request CreateIpControlRequest
 * @return CreateIpControlResponse
 */
async function createIpControl(request: CreateIpControlRequest): CreateIpControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return createIpControlWithOptions(request, runtime);
}

model CreateLogConfigRequest {
  createSlr?: boolean(name='CreateSlr', description='Specifies to create a service-linked role.', example='true'),
  logType?: string(name='LogType', description='The log type.

Valid values:

*   PROVIDER', example='PROVIDER'),
  securityToken?: string(name='SecurityToken'),
  slsLogStore?: string(name='SlsLogStore', description='slslogstore

This parameter is required.', example='api-gateway'),
  slsProject?: string(name='SlsProject', description='The name of the Log Service project.

This parameter is required.', example='rec-lq-sls'),
}

model CreateLogConfigResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model CreateLogConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLogConfigResponseBody(name='body'),
}

/**
 * @summary Creates a Simple Log Service configuration for an API.
 *
 * @param request CreateLogConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLogConfigResponse
 */
async function createLogConfigWithOptions(request: CreateLogConfigRequest, runtime: Util.RuntimeOptions): CreateLogConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.createSlr)) {
    query['CreateSlr'] = request.createSlr;
  }
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.slsLogStore)) {
    query['SlsLogStore'] = request.slsLogStore;
  }
  if (!Util.isUnset(request.slsProject)) {
    query['SlsProject'] = request.slsProject;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLogConfig',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a Simple Log Service configuration for an API.
 *
 * @param request CreateLogConfigRequest
 * @return CreateLogConfigResponse
 */
async function createLogConfig(request: CreateLogConfigRequest): CreateLogConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLogConfigWithOptions(request, runtime);
}

model CreateModelRequest {
  description?: string(name='Description', description='The description of the model definition.', example='Model Description'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the model belongs.

This parameter is required.', example='30e792398d6c4569b04c0e53a3494381'),
  modelName?: string(name='ModelName', description='The name of the model. The name must be unique within the group.

This parameter is required.', example='Test'),
  schema?: string(name='Schema', description='The definition of the model in JSON Schema.

This parameter is required.', example='{"type":"object","properties":{"id":{"format":"int64","maximum":100,"exclusiveMaximum":true,"type":"integer"},"name":{"maxLength":10,"type":"string"}}}'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='key'),
      value?: string(name='Value', description='The values of the tag.', example='123'),
    }
  ](name='Tag', description='The object tags that match the lifecycle rule. You can specify multiple tags.'),
}

model CreateModelResponseBody = {
  createdTime?: string(name='CreatedTime', description='The time when the model was created.', example='2019-01-29T09:33:01Z'),
  description?: string(name='Description', description='The description of the created model.', example='Model Description'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the created model belongs.', example='30e792398d6c4569b04c0e53a3494381'),
  modelId?: string(name='ModelId', description='The ID of the created model.', example='766c0b9538a04bdf974953b5576783ba'),
  modelName?: string(name='ModelName', description='The name of the created model.', example='Test'),
  modelRef?: string(name='ModelRef', description='The URI of the created model.', example='https://apigateway.aliyun.com/models/30e792398d6c4569b04c0e53a3494381/766c0b9538a04bdf974953b5576783ba'),
  modifiedTime?: string(name='ModifiedTime', description='The time when the model is last modified.', example='2019-01-29T09:33:01Z'),
  regionId?: string(name='RegionId', description='The region to which the created model belongs.', example='cn-qingdao'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4173F95B-360C-460C-9F6C-4A960B904411'),
  schema?: string(name='Schema', description='The definition of the created model.', example='{\\\\"type\\\\":\\\\"object\\\\",\\\\"properties\\\\":{\\\\"id\\\\":{\\\\"format\\\\":\\\\"int64\\\\",\\\\"maximum\\\\":100,\\\\"exclusiveMaximum\\\\":true,\\\\"type\\\\":\\\\"integer\\\\"},\\\\"name\\\\":{\\\\"maxLength\\\\":10,\\\\"type\\\\":\\\\"string\\\\"}}}'),
}

model CreateModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateModelResponseBody(name='body'),
}

/**
 * @summary Creates a model for an API group.
 *
 * @description *   For more information about the model definition, see [JSON Schema Draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04?spm=a2c4g.11186623.2.10.2e977ff7p4BpQd).
 * *   JSON Schema supports only element attributes of the Object type.
 *
 * @param request CreateModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateModelResponse
 */
async function createModelWithOptions(request: CreateModelRequest, runtime: Util.RuntimeOptions): CreateModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.modelName)) {
    query['ModelName'] = request.modelName;
  }
  if (!Util.isUnset(request.schema)) {
    query['Schema'] = request.schema;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a model for an API group.
 *
 * @description *   For more information about the model definition, see [JSON Schema Draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04?spm=a2c4g.11186623.2.10.2e977ff7p4BpQd).
 * *   JSON Schema supports only element attributes of the Object type.
 *
 * @param request CreateModelRequest
 * @return CreateModelResponse
 */
async function createModel(request: CreateModelRequest): CreateModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createModelWithOptions(request, runtime);
}

model CreateMonitorGroupRequest {
  auth?: string(name='Auth', description='The caller authentication status of the API. Valid values: **ok**: The authentication is successful. **mismatch**: The request is redirected. **servicenotfound**: A request error occurred. **Unknown**: An unknown error occurred.

This parameter is required.', example='false'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='6735211ab9094c818f32f27bc545b6c8'),
  rawMonitorGroupId?: long(name='RawMonitorGroupId', description='The ID of the monitoring group.', example='166636221'),
  securityToken?: string(name='SecurityToken'),
}

model CreateMonitorGroupResponseBody = {
  monitorGroupId?: long(name='MonitorGroupId', description='The ID of the API group. This ID is generated by the system and is unique globally.', example='187421794'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='5D7136F7-9D67-5D4D-8418-6A512CCEE3A2'),
}

model CreateMonitorGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMonitorGroupResponseBody(name='body'),
}

/**
 * @summary Enables CloudMonitor alerting for a specified API group.
 *
 * @param request CreateMonitorGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMonitorGroupResponse
 */
async function createMonitorGroupWithOptions(request: CreateMonitorGroupRequest, runtime: Util.RuntimeOptions): CreateMonitorGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.auth)) {
    query['Auth'] = request.auth;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.rawMonitorGroupId)) {
    query['RawMonitorGroupId'] = request.rawMonitorGroupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMonitorGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables CloudMonitor alerting for a specified API group.
 *
 * @param request CreateMonitorGroupRequest
 * @return CreateMonitorGroupResponse
 */
async function createMonitorGroup(request: CreateMonitorGroupRequest): CreateMonitorGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMonitorGroupWithOptions(request, runtime);
}

model CreatePluginRequest {
  description?: string(name='Description', description='The description of the plug-in. The description can contain a maximum of 200 characters in length.', example='createPlugin'),
  pluginData?: string(name='PluginData', description='The plug-in definition. Supported formats: JSON and YAML.

This parameter is required.', example='Plugin definition'),
  pluginName?: string(name='PluginName', description='The name of the plug-in. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). However, it cannot start with an underscore.

This parameter is required.', example='NewCors'),
  pluginType?: string(name='PluginType', description='The type of the plug-in. Valid values:

*   **ipControl: IP address-based access control**
*   **trafficControl: throttling**
*   **backendSignature: backend signature**
*   **jwtAuth** :JWT (OpenId Connect) authentication
*   **cors** :cross-origin resource sharing (CORS)
*   **caching**

This parameter is required.', example='cors'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='env'),
      value?: string(name='Value', description='The value of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model CreatePluginResponseBody = {
  pluginId?: string(name='PluginId', description='The ID of the plug-in.', example='1f3bde29b43d4d53989248327ff737f2'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
  tagStatus?: boolean(name='TagStatus', description='Indicates whether the plug-in is successfully marked.', example='true'),
}

model CreatePluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePluginResponseBody(name='body'),
}

/**
 * @summary Creates a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   The number of plug-ins of the same type that each user can create is limited. Different limits apply to different plug-in types.
 * *   The plug-in definitions for advanced features are restricted.
 * *   Plug-ins must be bound to APIs to take effect. After a plug-in is bound, it takes effect on that API immediately.
 *
 * @param request CreatePluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePluginResponse
 */
async function createPluginWithOptions(request: CreatePluginRequest, runtime: Util.RuntimeOptions): CreatePluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.pluginData)) {
    query['PluginData'] = request.pluginData;
  }
  if (!Util.isUnset(request.pluginName)) {
    query['PluginName'] = request.pluginName;
  }
  if (!Util.isUnset(request.pluginType)) {
    query['PluginType'] = request.pluginType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreatePlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   The number of plug-ins of the same type that each user can create is limited. Different limits apply to different plug-in types.
 * *   The plug-in definitions for advanced features are restricted.
 * *   Plug-ins must be bound to APIs to take effect. After a plug-in is bound, it takes effect on that API immediately.
 *
 * @param request CreatePluginRequest
 * @return CreatePluginResponse
 */
async function createPlugin(request: CreatePluginRequest): CreatePluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPluginWithOptions(request, runtime);
}

model CreatePrivateDNSRequest {
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.

This parameter is required.', example='api.demo.com'),
  records?: [ 
    {
      record?: string(name='Record', description='The resolution record.', example='192.168.0.1'),
      weight?: int32(name='Weight', description='The weight of the record.', example='100'),
    }
  ](name='Records', description='The resolution records. This parameter is valid only when Type is set to A.'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for VPC access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.

This parameter is required.', example='A'),
}

model CreatePrivateDNSShrinkRequest {
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.

This parameter is required.', example='api.demo.com'),
  recordsShrink?: string(name='Records', description='The resolution records. This parameter is valid only when Type is set to A.'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for VPC access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.

This parameter is required.', example='A'),
}

model CreatePrivateDNSResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model CreatePrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePrivateDNSResponseBody(name='body'),
}

/**
 * @summary Creates an internal domain name resolution and adds a resolution record.
 *
 * @description An internal domain name resolution of the virtual private cloud (VPC) type can be bound only to traditional dedicated instances. An internal domain name resolution of the A type can be bound only to VPC integration dedicated instances.
 *
 * @param tmpReq CreatePrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePrivateDNSResponse
 */
async function createPrivateDNSWithOptions(tmpReq: CreatePrivateDNSRequest, runtime: Util.RuntimeOptions): CreatePrivateDNSResponse {
  Util.validateModel(tmpReq);
  var request = new CreatePrivateDNSShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.records)) {
    request.recordsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.records, 'Records', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.intranetDomain)) {
    query['IntranetDomain'] = request.intranetDomain;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.recordsShrink)) {
    body['Records'] = request.recordsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an internal domain name resolution and adds a resolution record.
 *
 * @description An internal domain name resolution of the virtual private cloud (VPC) type can be bound only to traditional dedicated instances. An internal domain name resolution of the A type can be bound only to VPC integration dedicated instances.
 *
 * @param request CreatePrivateDNSRequest
 * @return CreatePrivateDNSResponse
 */
async function createPrivateDNS(request: CreatePrivateDNSRequest): CreatePrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPrivateDNSWithOptions(request, runtime);
}

model CreateSignatureRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='fa876ffb-caab-4f0a-93b3-3409f2fa5199'),
  signatureKey?: string(name='SignatureKey', description='The Key value of the key. The value must be 6 to 20 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.

This parameter is required.', example='qwertyuiop'),
  signatureName?: string(name='SignatureName', description='The displayed name of the key. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.

This parameter is required.', example='backendsignature'),
  signatureSecret?: string(name='SignatureSecret', description='The Secret value of the key. The value must be 6 to 30 characters in length and can contain letters, digits, and special characters. Special characters include underscores (_), at signs (@), number signs (#), exclamation points (!), and asterisks (\\\\*). The value must start with a letter.

This parameter is required.', example='asdfghjkl'),
}

model CreateSignatureResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  signatureId?: string(name='SignatureId', description='The ID of the back-end signature key.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  signatureName?: string(name='SignatureName', description='The name of the back-end signature key.', example='backendsignature'),
}

model CreateSignatureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSignatureResponseBody(name='body'),
}

/**
 * @summary Creates a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   The API operation only creates a key policy. You must call the binding operation to bind the key to an API.
 * *   After the key is bound to the API, requests sent from API Gateway to the backend service contain signature strings. You can specify whether your backend service verifies these signature strings.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateSignatureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSignatureResponse
 */
async function createSignatureWithOptions(request: CreateSignatureRequest, runtime: Util.RuntimeOptions): CreateSignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureKey)) {
    query['SignatureKey'] = request.signatureKey;
  }
  if (!Util.isUnset(request.signatureName)) {
    query['SignatureName'] = request.signatureName;
  }
  if (!Util.isUnset(request.signatureSecret)) {
    query['SignatureSecret'] = request.signatureSecret;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSignature',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   The API operation only creates a key policy. You must call the binding operation to bind the key to an API.
 * *   After the key is bound to the API, requests sent from API Gateway to the backend service contain signature strings. You can specify whether your backend service verifies these signature strings.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateSignatureRequest
 * @return CreateSignatureResponse
 */
async function createSignature(request: CreateSignatureRequest): CreateSignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSignatureWithOptions(request, runtime);
}

model CreateTrafficControlRequest {
  apiDefault?: int32(name='ApiDefault', description='The default throttling value for each API.

This parameter is required.', example='10000'),
  appDefault?: int32(name='AppDefault', description='The default throttling value for each app.', example='10000'),
  description?: string(name='Description', description='The description of the throttling policy.', example='ThrottlingTestDescription'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='436fa39b-b3b9-40c5-ae5d-ce3e000e38c5'),
  trafficControlName?: string(name='TrafficControlName', description='The name of the throttling policy. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). It cannot start with an underscore.

This parameter is required.', example='ThrottlingTest'),
  trafficControlUnit?: string(name='TrafficControlUnit', description='The unit to be used in the throttling policy. Valid values:

*   **SECOND**
*   **MINUTE**
*   **HOUR**
*   **DAY**

This parameter is required.', example='MINUTE'),
  userDefault?: int32(name='UserDefault', description='The default throttling value for each user.', example='10000'),
}

model CreateTrafficControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.', example='tf123456'),
}

model CreateTrafficControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTrafficControlResponseBody(name='body'),
}

/**
 * @summary Creates a custom throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   Throttling policies must be bound to APIs to take effect. After a policy is bound to an API, it goes into effect on that API immediately.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateTrafficControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTrafficControlResponse
 */
async function createTrafficControlWithOptions(request: CreateTrafficControlRequest, runtime: Util.RuntimeOptions): CreateTrafficControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiDefault)) {
    query['ApiDefault'] = request.apiDefault;
  }
  if (!Util.isUnset(request.appDefault)) {
    query['AppDefault'] = request.appDefault;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.trafficControlName)) {
    query['TrafficControlName'] = request.trafficControlName;
  }
  if (!Util.isUnset(request.trafficControlUnit)) {
    query['TrafficControlUnit'] = request.trafficControlUnit;
  }
  if (!Util.isUnset(request.userDefault)) {
    query['UserDefault'] = request.userDefault;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTrafficControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a custom throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   Throttling policies must be bound to APIs to take effect. After a policy is bound to an API, it goes into effect on that API immediately.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request CreateTrafficControlRequest
 * @return CreateTrafficControlResponse
 */
async function createTrafficControl(request: CreateTrafficControlRequest): CreateTrafficControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTrafficControlWithOptions(request, runtime);
}

model DeleteAccessControlListRequest {
  aclId?: string(name='AclId', description='The ID of the access control policy.

This parameter is required.', example='acl-uf6fpfdg3b5muska7uqem'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteAccessControlListResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model DeleteAccessControlListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAccessControlListResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Deletes an access control policy.
 *
 * @param request DeleteAccessControlListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAccessControlListResponse
 */
async function deleteAccessControlListWithOptions(request: DeleteAccessControlListRequest, runtime: Util.RuntimeOptions): DeleteAccessControlListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAccessControlList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated instances. Deletes an access control policy.
 *
 * @param request DeleteAccessControlListRequest
 * @return DeleteAccessControlListResponse
 */
async function deleteAccessControlList(request: DeleteAccessControlListRequest): DeleteAccessControlListResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAccessControlListWithOptions(request, runtime);
}

model DeleteAllTrafficSpecialControlRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='fa876ffb-caab-4f0a-93b3-3409f2fa5199'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.

This parameter is required.', example='tf123456'),
}

model DeleteAllTrafficSpecialControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DeleteAllTrafficSpecialControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAllTrafficSpecialControlResponseBody(name='body'),
}

/**
 * @summary Deletes all custom special policies of a specified throttling policy.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DeleteAllTrafficSpecialControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAllTrafficSpecialControlResponse
 */
async function deleteAllTrafficSpecialControlWithOptions(request: DeleteAllTrafficSpecialControlRequest, runtime: Util.RuntimeOptions): DeleteAllTrafficSpecialControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAllTrafficSpecialControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes all custom special policies of a specified throttling policy.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DeleteAllTrafficSpecialControlRequest
 * @return DeleteAllTrafficSpecialControlResponse
 */
async function deleteAllTrafficSpecialControl(request: DeleteAllTrafficSpecialControlRequest): DeleteAllTrafficSpecialControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAllTrafficSpecialControlWithOptions(request, runtime);
}

model DeleteApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteApiResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ017'),
}

model DeleteApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApiResponseBody(name='body'),
}

/**
 * @summary Deletes the definition of a specified API.
 *
 * @description *   This operation is intended for API providers and cannot be undone after it is complete.
 * *   An API that is running in the runtime environment must be unpublished before you can delete the API.****
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApiResponse
 */
async function deleteApiWithOptions(request: DeleteApiRequest, runtime: Util.RuntimeOptions): DeleteApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the definition of a specified API.
 *
 * @description *   This operation is intended for API providers and cannot be undone after it is complete.
 * *   An API that is running in the runtime environment must be unpublished before you can delete the API.****
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteApiRequest
 * @return DeleteApiResponse
 */
async function deleteApi(request: DeleteApiRequest): DeleteApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApiWithOptions(request, runtime);
}

model DeleteApiGroupRequest {
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

This parameter is required.', example='key'),
      value?: string(name='Value', description='The value of the tag.

This parameter is required.', example='value'),
    }
  ](name='Tag', description='The object tags that match the lifecycle rule. You can specify multiple tags.', example='Key， Value'),
}

model DeleteApiGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='E8515BA6-81CD-4191-A7CF-C4FCDD3C0D99'),
}

model DeleteApiGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApiGroupResponseBody(name='body'),
}

/**
 * @summary Deletes an API group.
 *
 * @description *   This operation is intended for API providers.
 * *   An API group that contains APIs cannot be deleted. To delete the API group, you must first delete its APIs.
 * *   After an API group is deleted, the second-level domain name bound to the API group is automatically invalidated.
 * *   If the specified API group does not exist, a success response is returned.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteApiGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApiGroupResponse
 */
async function deleteApiGroupWithOptions(request: DeleteApiGroupRequest, runtime: Util.RuntimeOptions): DeleteApiGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApiGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an API group.
 *
 * @description *   This operation is intended for API providers.
 * *   An API group that contains APIs cannot be deleted. To delete the API group, you must first delete its APIs.
 * *   After an API group is deleted, the second-level domain name bound to the API group is automatically invalidated.
 * *   If the specified API group does not exist, a success response is returned.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteApiGroupRequest
 * @return DeleteApiGroupResponse
 */
async function deleteApiGroup(request: DeleteApiGroupRequest): DeleteApiGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApiGroupWithOptions(request, runtime);
}

model DeleteApiProductRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteApiProductResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ002'),
}

model DeleteApiProductResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApiProductResponseBody(name='body'),
}

/**
 * @summary Deletes an API product. Deleting an API product causes the association between APIs and the deleted API product to be deleted as well. Exercise caution when you delete an API product. If any API in the API product is associated with an application, the API product fails to be deleted.
 *
 * @param request DeleteApiProductRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApiProductResponse
 */
async function deleteApiProductWithOptions(request: DeleteApiProductRequest, runtime: Util.RuntimeOptions): DeleteApiProductResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApiProduct',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an API product. Deleting an API product causes the association between APIs and the deleted API product to be deleted as well. Exercise caution when you delete an API product. If any API in the API product is associated with an application, the API product fails to be deleted.
 *
 * @param request DeleteApiProductRequest
 * @return DeleteApiProductResponse
 */
async function deleteApiProduct(request: DeleteApiProductRequest): DeleteApiProductResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApiProductWithOptions(request, runtime);
}

model DeleteApiStageVariableRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageId?: string(name='StageId', description='The ID of the environment.

This parameter is required.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
  variableName?: string(name='VariableName', description='The name of the variable to be deleted. This parameter is case-sensitive.

This parameter is required.', example='serverName'),
}

model DeleteApiStageVariableResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='03442A3D-3B7D-434C-8A95-A5FEB969B529'),
}

model DeleteApiStageVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApiStageVariableResponseBody(name='body'),
}

/**
 * @summary Deletes a specified variable in a specified environment.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DeleteApiStageVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApiStageVariableResponse
 */
async function deleteApiStageVariableWithOptions(request: DeleteApiStageVariableRequest, runtime: Util.RuntimeOptions): DeleteApiStageVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageId)) {
    query['StageId'] = request.stageId;
  }
  if (!Util.isUnset(request.variableName)) {
    query['VariableName'] = request.variableName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApiStageVariable',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a specified variable in a specified environment.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DeleteApiStageVariableRequest
 * @return DeleteApiStageVariableResponse
 */
async function deleteApiStageVariable(request: DeleteApiStageVariableRequest): DeleteApiStageVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApiStageVariableWithOptions(request, runtime);
}

model DeleteAppRequest {
  appId?: long(name='AppId', description='The ID of the application.

This parameter is required.', example='110840611'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

This parameter is required.', example='appname'),
      value?: string(name='Value', description='The value of the tag.', example='testapp'),
    }
  ](name='Tag', description='The tags. Up to 20 tags are allowed.', example='test2'),
}

model DeleteAppResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DeleteAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppResponseBody(name='body'),
}

/**
 * @summary Deletes an application.
 *
 * @description *   This operation is intended for API callers.
 * *   After an application is deleted, the application and its API authorization cannot be restored.
 * *   You can call this operation up to 50 times per second per account.
 *
 * @param request DeleteAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppResponse
 */
async function deleteAppWithOptions(request: DeleteAppRequest, runtime: Util.RuntimeOptions): DeleteAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an application.
 *
 * @description *   This operation is intended for API callers.
 * *   After an application is deleted, the application and its API authorization cannot be restored.
 * *   You can call this operation up to 50 times per second per account.
 *
 * @param request DeleteAppRequest
 * @return DeleteAppResponse
 */
async function deleteApp(request: DeleteAppRequest): DeleteAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppWithOptions(request, runtime);
}

model DeleteAppCodeRequest {
  appCode?: string(name='AppCode', description='The application AppCode.

This parameter is required.', example='0d13f021c5cd4997831a9717e75b0663'),
  appId?: string(name='AppId', description='The application ID.

This parameter is required.', example='111265074'),
}

model DeleteAppCodeResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='E8515BA6-81CD-4191-A7CF-C4FCDD3C0D99'),
}

model DeleteAppCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppCodeResponseBody(name='body'),
}

/**
 * @summary Deletes the AppCode of an application.
 *
 * @param request DeleteAppCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppCodeResponse
 */
async function deleteAppCodeWithOptions(request: DeleteAppCodeRequest, runtime: Util.RuntimeOptions): DeleteAppCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppCode',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the AppCode of an application.
 *
 * @param request DeleteAppCodeRequest
 * @return DeleteAppCodeResponse
 */
async function deleteAppCode(request: DeleteAppCodeRequest): DeleteAppCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppCodeWithOptions(request, runtime);
}

model DeleteAppKeyRequest {
  appId?: string(name='AppId', description='The application ID.

This parameter is required.', example='110840611'),
  appKey?: string(name='AppKey', description='The AppKey of the application. The AppKey is used for calling an API.

This parameter is required.', example='203708622'),
}

model DeleteAppKeyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='79EF055D-AC00-5161-8F35-6A36AAED7422'),
}

model DeleteAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppKeyResponseBody(name='body'),
}

/**
 * @summary Deletes the AppKey and AppSecret of an application.
 *
 * @param request DeleteAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppKeyResponse
 */
async function deleteAppKeyWithOptions(request: DeleteAppKeyRequest, runtime: Util.RuntimeOptions): DeleteAppKeyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppKey',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the AppKey and AppSecret of an application.
 *
 * @param request DeleteAppKeyRequest
 * @return DeleteAppKeyResponse
 */
async function deleteAppKey(request: DeleteAppKeyRequest): DeleteAppKeyResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppKeyWithOptions(request, runtime);
}

model DeleteBackendRequest {
  backendId?: string(name='BackendId', description='The ID of the backend service.', example='27be0dd9ebbc467b9e86c0d250d0b92e'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteBackendResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='AD00F8C0-311B-54A9-ADE2-2436771012DA'),
}

model DeleteBackendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBackendResponseBody(name='body'),
}

/**
 * @summary Deletes a backend service.
 *
 * @param request DeleteBackendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBackendResponse
 */
async function deleteBackendWithOptions(request: DeleteBackendRequest, runtime: Util.RuntimeOptions): DeleteBackendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBackend',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a backend service.
 *
 * @param request DeleteBackendRequest
 * @return DeleteBackendResponse
 */
async function deleteBackend(request: DeleteBackendRequest): DeleteBackendResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBackendWithOptions(request, runtime);
}

model DeleteBackendModelRequest {
  backendId?: string(name='BackendId', description='The ID of the backend service.', example='20bcdc9453524b78a8beb1f6de21edb7'),
  backendModelId?: string(name='BackendModelId', description='The ID of the backend model.

This parameter is required.', example='4be6b110b7aa40b0bf0c83cc00b3bd86'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE**
*   **TEST**', example='TEST'),
}

model DeleteBackendModelResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the operation.', example='f7834d74be4e41aa8e607b0fafae9b33'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D1B18FFE-4A81-59D8-AA02-1817098977CD'),
}

model DeleteBackendModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBackendModelResponseBody(name='body'),
}

/**
 * @summary Deletes the definition of a backend service in an environment. After the definition is deleted, the API that uses the backend service and is published to this environment will be unpublished.
 *
 * @param request DeleteBackendModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBackendModelResponse
 */
async function deleteBackendModelWithOptions(request: DeleteBackendModelRequest, runtime: Util.RuntimeOptions): DeleteBackendModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.backendModelId)) {
    query['BackendModelId'] = request.backendModelId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBackendModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the definition of a backend service in an environment. After the definition is deleted, the API that uses the backend service and is published to this environment will be unpublished.
 *
 * @param request DeleteBackendModelRequest
 * @return DeleteBackendModelResponse
 */
async function deleteBackendModel(request: DeleteBackendModelRequest): DeleteBackendModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBackendModelWithOptions(request, runtime);
}

model DeleteDatasetRequest {
  datasetId?: string(name='DatasetId', description='This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteDatasetResponseBody = {
  requestId?: string(name='RequestId', example='048C8EFB-528F-5E97-8A3D-D17B********'),
}

model DeleteDatasetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDatasetResponseBody(name='body'),
}

/**
 * @summary 删除自定义数据集
 *
 * @param request DeleteDatasetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDatasetResponse
 */
async function deleteDatasetWithOptions(request: DeleteDatasetRequest, runtime: Util.RuntimeOptions): DeleteDatasetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataset',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除自定义数据集
 *
 * @param request DeleteDatasetRequest
 * @return DeleteDatasetResponse
 */
async function deleteDataset(request: DeleteDatasetRequest): DeleteDatasetResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDatasetWithOptions(request, runtime);
}

model DeleteDatasetItemRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  datasetItemId?: string(name='DatasetItemId', description='The ID of the data entry.

This parameter is required.', example='5045****'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteDatasetItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='FF433E09-663A-5F5D-9DBA-A611********'),
}

model DeleteDatasetItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDatasetItemResponseBody(name='body'),
}

/**
 * @summary Deletes a data entry from a custom dataset.
 *
 * @param request DeleteDatasetItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDatasetItemResponse
 */
async function deleteDatasetItemWithOptions(request: DeleteDatasetItemRequest, runtime: Util.RuntimeOptions): DeleteDatasetItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.datasetItemId)) {
    query['DatasetItemId'] = request.datasetItemId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDatasetItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a data entry from a custom dataset.
 *
 * @param request DeleteDatasetItemRequest
 * @return DeleteDatasetItemResponse
 */
async function deleteDatasetItem(request: DeleteDatasetItemRequest): DeleteDatasetItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDatasetItemWithOptions(request, runtime);
}

model DeleteDomainRequest {
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the domain name to be unbound is bound. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteDomainResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
}

model DeleteDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDomainResponseBody(name='body'),
}

/**
 * @summary Unbinds a custom domain name from an API group.
 *
 * @description *   This operation is intended for API providers.
 * *   If the specified domain name does not exist, a successful response will still appear.
 * *   Unbinding a domain name from an API group will affect access to the APIs in the group. Exercise caution when using this operation.
 *
 * @param request DeleteDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDomainResponse
 */
async function deleteDomainWithOptions(request: DeleteDomainRequest, runtime: Util.RuntimeOptions): DeleteDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDomain',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds a custom domain name from an API group.
 *
 * @description *   This operation is intended for API providers.
 * *   If the specified domain name does not exist, a successful response will still appear.
 * *   Unbinding a domain name from an API group will affect access to the APIs in the group. Exercise caution when using this operation.
 *
 * @param request DeleteDomainRequest
 * @return DeleteDomainResponse
 */
async function deleteDomain(request: DeleteDomainRequest): DeleteDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDomainWithOptions(request, runtime);
}

model DeleteDomainCertificateRequest {
  certificateId?: string(name='CertificateId', description='The ID of the SSL certificate that you want to delete. The ID is automatically generated by the system and globally unique.

This parameter is required.', example='c621720d1eb34843822b7fb5148e6926'),
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteDomainCertificateResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
}

model DeleteDomainCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDomainCertificateResponseBody(name='body'),
}

/**
 * @summary Deletes the SSL certificate of a specified domain name. This operation is intended for API providers. If the SSL certificate does not exist, a success response is still returned. If the specified API group does not exist, the InvalidGroupId.NotFound error is returned. Access over HTTPS is not supported after the SSL certificate is deleted. Exercise caution when using this API operation.
 *
 * @param request DeleteDomainCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDomainCertificateResponse
 */
async function deleteDomainCertificateWithOptions(request: DeleteDomainCertificateRequest, runtime: Util.RuntimeOptions): DeleteDomainCertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.certificateId)) {
    query['CertificateId'] = request.certificateId;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDomainCertificate',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the SSL certificate of a specified domain name. This operation is intended for API providers. If the SSL certificate does not exist, a success response is still returned. If the specified API group does not exist, the InvalidGroupId.NotFound error is returned. Access over HTTPS is not supported after the SSL certificate is deleted. Exercise caution when using this API operation.
 *
 * @param request DeleteDomainCertificateRequest
 * @return DeleteDomainCertificateResponse
 */
async function deleteDomainCertificate(request: DeleteDomainCertificateRequest): DeleteDomainCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDomainCertificateWithOptions(request, runtime);
}

model DeleteInstanceRequest {
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-sh-ae502ee79ef8'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

This parameter is required.', example='key'),
      value?: string(name='Value', description='The value of the tag.

This parameter is required.', example='value'),
    }
  ](name='Tag', description='The tag of objects that match the lifecycle rule. You can specify multiple tags.', example='Key， Value'),
}

model DeleteInstanceResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CA4B3261-F14A-5E33-8608-F75A1DF27AD4'),
}

model DeleteInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteInstanceResponseBody(name='body'),
}

/**
 * @summary Deletes an API Gateway instance.
 *
 * @param request DeleteInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteInstanceResponse
 */
async function deleteInstanceWithOptions(request: DeleteInstanceRequest, runtime: Util.RuntimeOptions): DeleteInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteInstance',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an API Gateway instance.
 *
 * @param request DeleteInstanceRequest
 * @return DeleteInstanceResponse
 */
async function deleteInstance(request: DeleteInstanceRequest): DeleteInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteInstanceWithOptions(request, runtime);
}

model DeleteIpControlRequest {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.

This parameter is required.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteIpControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DeleteIpControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteIpControlResponseBody(name='body'),
}

/**
 * @summary Deletes an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   If the ACL is bound to an API, you must unbind the ACL from the API before you can delete the ACL. Otherwise, an error is returned.
 * *   If you call this operation on an ACL that does not exist, a success message is returned.
 *
 * @param request DeleteIpControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteIpControlResponse
 */
async function deleteIpControlWithOptions(request: DeleteIpControlRequest, runtime: Util.RuntimeOptions): DeleteIpControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteIpControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   If the ACL is bound to an API, you must unbind the ACL from the API before you can delete the ACL. Otherwise, an error is returned.
 * *   If you call this operation on an ACL that does not exist, a success message is returned.
 *
 * @param request DeleteIpControlRequest
 * @return DeleteIpControlResponse
 */
async function deleteIpControl(request: DeleteIpControlRequest): DeleteIpControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteIpControlWithOptions(request, runtime);
}

model DeleteLogConfigRequest {
  logType?: string(name='LogType', description='The log type. Valid values: **log** and **survey**.', example='log'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLogConfigResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
}

model DeleteLogConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLogConfigResponseBody(name='body'),
}

/**
 * @summary Delete the specified log configuration.
 *
 * @param request DeleteLogConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLogConfigResponse
 */
async function deleteLogConfigWithOptions(request: DeleteLogConfigRequest, runtime: Util.RuntimeOptions): DeleteLogConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLogConfig',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Delete the specified log configuration.
 *
 * @param request DeleteLogConfigRequest
 * @return DeleteLogConfigResponse
 */
async function deleteLogConfig(request: DeleteLogConfigRequest): DeleteLogConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLogConfigWithOptions(request, runtime);
}

model DeleteModelRequest {
  groupId?: string(name='GroupId', description='The ID of the API group to which the model belongs.

This parameter is required.', example='30e792398d6c4569b04c0e53a3494381'),
  modelName?: string(name='ModelName', description='The name of the model.

This parameter is required.', example='Test'),
}

model DeleteModelResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='4173F95B-360C-460C-9F6C-4A960B904411'),
}

model DeleteModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteModelResponseBody(name='body'),
}

/**
 * @summary Deletes a model.
 *
 * @param request DeleteModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteModelResponse
 */
async function deleteModelWithOptions(request: DeleteModelRequest, runtime: Util.RuntimeOptions): DeleteModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.modelName)) {
    query['ModelName'] = request.modelName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a model.
 *
 * @param request DeleteModelRequest
 * @return DeleteModelResponse
 */
async function deleteModel(request: DeleteModelRequest): DeleteModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteModelWithOptions(request, runtime);
}

model DeleteMonitorGroupRequest {
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='42925e7f5209438186d5560239af5286'),
  rawMonitorGroupId?: long(name='RawMonitorGroupId', description='The ID of the monitoring group.', example='166636221'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteMonitorGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='C7E2CBAA-47FF-569F-AF12-B14B80E25422'),
}

model DeleteMonitorGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteMonitorGroupResponseBody(name='body'),
}

/**
 * @summary Deletes a CloudMonitor application group corresponding to an API group.
 *
 * @param request DeleteMonitorGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteMonitorGroupResponse
 */
async function deleteMonitorGroupWithOptions(request: DeleteMonitorGroupRequest, runtime: Util.RuntimeOptions): DeleteMonitorGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.rawMonitorGroupId)) {
    query['RawMonitorGroupId'] = request.rawMonitorGroupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMonitorGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a CloudMonitor application group corresponding to an API group.
 *
 * @param request DeleteMonitorGroupRequest
 * @return DeleteMonitorGroupResponse
 */
async function deleteMonitorGroup(request: DeleteMonitorGroupRequest): DeleteMonitorGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMonitorGroupWithOptions(request, runtime);
}

model DeletePluginRequest {
  pluginId?: string(name='PluginId', description='The ID of the plug-in to be deleted.

This parameter is required.', example='9a3f1a5279434f2ba74ccd91c295af9f'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='env'),
      value?: string(name='Value', description='The value of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
}

model DeletePluginResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeletePluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePluginResponseBody(name='body'),
}

/**
 * @summary Deletes a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   You must first unbind the plug-in from the API. Otherwise, an error is reported when you delete the plug-in.
 *
 * @param request DeletePluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePluginResponse
 */
async function deletePluginWithOptions(request: DeletePluginRequest, runtime: Util.RuntimeOptions): DeletePluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   You must first unbind the plug-in from the API. Otherwise, an error is reported when you delete the plug-in.
 *
 * @param request DeletePluginRequest
 * @return DeletePluginResponse
 */
async function deletePlugin(request: DeletePluginRequest): DeletePluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePluginWithOptions(request, runtime);
}

model DeletePrivateDNSRequest {
  force?: boolean(name='Force', description='Specifies whether to force delete the resolution.

*   true: force deletes the resolution if the resolution is associated with an instance.
*   false: does not force delete the resolution if the resolution is associated with an instance.', example='false'),
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.

This parameter is required.', example='api.demo.com'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for virtual private cloud (VPC) access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.

This parameter is required.', example='A'),
}

model DeletePrivateDNSResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model DeletePrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePrivateDNSResponseBody(name='body'),
}

/**
 * @summary Deletes an internal domain name resolution.
 *
 * @param request DeletePrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePrivateDNSResponse
 */
async function deletePrivateDNSWithOptions(request: DeletePrivateDNSRequest, runtime: Util.RuntimeOptions): DeletePrivateDNSResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }
  if (!Util.isUnset(request.intranetDomain)) {
    query['IntranetDomain'] = request.intranetDomain;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an internal domain name resolution.
 *
 * @param request DeletePrivateDNSRequest
 * @return DeletePrivateDNSResponse
 */
async function deletePrivateDNS(request: DeletePrivateDNSRequest): DeletePrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePrivateDNSWithOptions(request, runtime);
}

model DeleteSignatureRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='9abe3317-3e22-4957-ab9f-dd893d0ac956'),
  signatureId?: string(name='SignatureId', description='The ID of the key to be deleted.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
}

model DeleteSignatureResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DeleteSignatureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSignatureResponseBody(name='body'),
}

/**
 * @summary Deletes a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   This API operation deletes an existing backend signature key.
 * *   You cannot delete a key that is bound to an API. To delete the key, you must unbind it first.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteSignatureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSignatureResponse
 */
async function deleteSignatureWithOptions(request: DeleteSignatureRequest, runtime: Util.RuntimeOptions): DeleteSignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSignature',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   This API operation deletes an existing backend signature key.
 * *   You cannot delete a key that is bound to an API. To delete the key, you must unbind it first.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteSignatureRequest
 * @return DeleteSignatureResponse
 */
async function deleteSignature(request: DeleteSignatureRequest): DeleteSignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSignatureWithOptions(request, runtime);
}

model DeleteTrafficControlRequest {
  securityToken?: string(name='SecurityToken'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.

This parameter is required.', example='tf123456'),
}

model DeleteTrafficControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DeleteTrafficControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTrafficControlResponseBody(name='body'),
}

/**
 * @summary Deletes a custom throttling policy and the special throttling rules in the policy.
 *
 * @description *   This API is intended for API providers.
 * *   If the throttling policy you want to delete is bound to APIs, you need to unbind the policy first. Otherwise, an error is reported when you delete the policy.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteTrafficControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTrafficControlResponse
 */
async function deleteTrafficControlWithOptions(request: DeleteTrafficControlRequest, runtime: Util.RuntimeOptions): DeleteTrafficControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTrafficControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a custom throttling policy and the special throttling rules in the policy.
 *
 * @description *   This API is intended for API providers.
 * *   If the throttling policy you want to delete is bound to APIs, you need to unbind the policy first. Otherwise, an error is reported when you delete the policy.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeleteTrafficControlRequest
 * @return DeleteTrafficControlResponse
 */
async function deleteTrafficControl(request: DeleteTrafficControlRequest): DeleteTrafficControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTrafficControlWithOptions(request, runtime);
}

model DeleteTrafficSpecialControlRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='7c51b234-48d3-44e1-9b36-e2ddccc738e3'),
  specialKey?: string(name='SpecialKey', description='The ID of the app or Alibaba Cloud account. You can view your account ID on the [Account Management](https://account.console.aliyun.com/?spm=a2c4g.11186623.2.15.343130a8sDi8cO#/secure) page.

This parameter is required.', example='3382463'),
  specialType?: string(name='SpecialType', description='The type of the special throttling policy. Valid values:

*   **APP**
*   **USER**

This parameter is required.', example='APP'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.

This parameter is required.', example='tf123456'),
}

model DeleteTrafficSpecialControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DeleteTrafficSpecialControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTrafficSpecialControlResponseBody(name='body'),
}

/**
 * @summary Deletes a custom special throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   You can obtain the input parameters required in this operation by calling other APIs.
 *
 * @param request DeleteTrafficSpecialControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTrafficSpecialControlResponse
 */
async function deleteTrafficSpecialControlWithOptions(request: DeleteTrafficSpecialControlRequest, runtime: Util.RuntimeOptions): DeleteTrafficSpecialControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.specialKey)) {
    query['SpecialKey'] = request.specialKey;
  }
  if (!Util.isUnset(request.specialType)) {
    query['SpecialType'] = request.specialType;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTrafficSpecialControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a custom special throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   You can obtain the input parameters required in this operation by calling other APIs.
 *
 * @param request DeleteTrafficSpecialControlRequest
 * @return DeleteTrafficSpecialControlResponse
 */
async function deleteTrafficSpecialControl(request: DeleteTrafficSpecialControlRequest): DeleteTrafficSpecialControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTrafficSpecialControlWithOptions(request, runtime);
}

model DeployApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  description?: string(name='Description', description='The publishing remarks.

This parameter is required.', example='for_test1'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE**: the pre-release environment
*   **TEST**

This parameter is required.', example='RELEASE'),
}

model DeployApiResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DeployApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeployApiResponseBody(name='body'),
}

/**
 * @summary Publishes an API to an environment.
 *
 * @description *   This operation is intended for API providers. Only the API that you have defined and published to a runtime environment can be called.
 * *   An API is published to a cluster in under 5 seconds.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeployApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeployApiResponse
 */
async function deployApiWithOptions(request: DeployApiRequest, runtime: Util.RuntimeOptions): DeployApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeployApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Publishes an API to an environment.
 *
 * @description *   This operation is intended for API providers. Only the API that you have defined and published to a runtime environment can be called.
 * *   An API is published to a cluster in under 5 seconds.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request DeployApiRequest
 * @return DeployApiResponse
 */
async function deployApi(request: DeployApiRequest): DeployApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return deployApiWithOptions(request, runtime);
}

model DescribeAbolishApiTaskRequest {
  operationUid?: string(name='OperationUid', description='The ID of the unpublishing operation.

This parameter is required.', example='fc54****dd4c4***ad7edd7****39401'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAbolishApiTaskResponseBody = {
  apiAbolishResults?: {
    apiAbolishResult?: [ 
    {
      abolishStatus?: string(name='AbolishStatus', description='The unpublishing status.', example='OVER'),
      apiName?: string(name='ApiName', description='The name of the API.', example='v2_page_consent'),
      apiUid?: string(name='ApiUid', description='The ID of the API.', example='4e26cdbbb113416dba1f0285bed29979'),
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='Success. Request Success.'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='160cb6505e1c43a6b84346856d74eb47'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='wb2022021401619286'),
      stageId?: string(name='StageId', description='The ID of the runtime environment.', example='0919f2854a88484c91dc9253347c78f9'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
    }
  ](name='ApiAbolishResult')
  }(name='ApiAbolishResults', description='The result returned.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E8515BA6-81CD-4191-A7CF-C4FCDD3C0D99'),
}

model DescribeAbolishApiTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAbolishApiTaskResponseBody(name='body'),
}

/**
 * @summary 查询批量下线API任务
 *
 * @param request DescribeAbolishApiTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAbolishApiTaskResponse
 */
async function describeAbolishApiTaskWithOptions(request: DescribeAbolishApiTaskRequest, runtime: Util.RuntimeOptions): DescribeAbolishApiTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.operationUid)) {
    query['OperationUid'] = request.operationUid;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAbolishApiTask',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询批量下线API任务
 *
 * @param request DescribeAbolishApiTaskRequest
 * @return DescribeAbolishApiTaskResponse
 */
async function describeAbolishApiTask(request: DescribeAbolishApiTaskRequest): DescribeAbolishApiTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAbolishApiTaskWithOptions(request, runtime);
}

model DescribeAccessControlListAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the access control policy.', example='acl-3nsohdozz0ru8fi5onwz1'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAccessControlListAttributeResponseBody = {
  aclEntrys?: {
    aclEntry?: [ 
    {
      aclEntryComment?: string(name='AclEntryComment', description='The entry description.', example='default'),
      aclEntryIp?: string(name='AclEntryIp', description='The ACL entry.', example='192.168.1.0/24'),
    }
  ](name='AclEntry')
  }(name='AclEntrys', description='The information about the access control policy.'),
  aclId?: string(name='AclId', description='The ID of the access control policy.', example='acl-uf6fpfdg3b5muska7uqem'),
  aclName?: string(name='AclName', description='The name of the access control policy.', example='testAcl'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP protocol version. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DescribeAccessControlListAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccessControlListAttributeResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control for dedicated instances. Queries the details of an access control policy.
 *
 * @param request DescribeAccessControlListAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccessControlListAttributeResponse
 */
async function describeAccessControlListAttributeWithOptions(request: DescribeAccessControlListAttributeRequest, runtime: Util.RuntimeOptions): DescribeAccessControlListAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccessControlListAttribute',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control for dedicated instances. Queries the details of an access control policy.
 *
 * @param request DescribeAccessControlListAttributeRequest
 * @return DescribeAccessControlListAttributeResponse
 */
async function describeAccessControlListAttribute(request: DescribeAccessControlListAttributeRequest): DescribeAccessControlListAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccessControlListAttributeWithOptions(request, runtime);
}

model DescribeAccessControlListsRequest {
  aclName?: string(name='AclName', description='The name of the access control policy.', example='testAcl'),
  addressIPVersion?: string(name='AddressIPVersion', description='IP版本，可以设置为**ipv4**或者**ipv6**。', example='ipv6'),
  pageNumber?: int32(name='PageNumber', description='The page number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAccessControlListsResponseBody = {
  acls?: {
    acl?: [ 
    {
      aclId?: string(name='AclId', description='The ID of the access control policy.', example='acl-3nsohdozz0ru8fi5onwz1'),
      aclName?: string(name='AclName', description='The name of the access control policy.', example='testAcl'),
      addressIPVersion?: string(name='AddressIPVersion', description='访问控制策略组的IP版本。
- **IPv4**。
- **IPv6**。', example='ipv4'),
    }
  ](name='Acl')
  }(name='Acls', description='The ACLs.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='3'),
}

model DescribeAccessControlListsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccessControlListsResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control for dedicated instances. Queries access control policies.
 *
 * @param request DescribeAccessControlListsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccessControlListsResponse
 */
async function describeAccessControlListsWithOptions(request: DescribeAccessControlListsRequest, runtime: Util.RuntimeOptions): DescribeAccessControlListsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccessControlLists',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control for dedicated instances. Queries access control policies.
 *
 * @param request DescribeAccessControlListsRequest
 * @return DescribeAccessControlListsResponse
 */
async function describeAccessControlLists(request: DescribeAccessControlListsRequest): DescribeAccessControlListsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccessControlListsWithOptions(request, runtime);
}

model DescribeApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='8afff6c8c4c6447abb035812e4d66b65'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='123'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApiResponseBody = {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='If **AuthType** is set to **APP**, this value must be passed to specify the signature algorithm. If you do not specify a value, HmacSHA256 is used by default. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='HmacSHA256'),
  apiId?: string(name='ApiId', description='The ID of the API.', example='8afff6c8c4c6447abb035812e4d66b65'),
  apiName?: string(name='ApiName', description='The name of the API, which is unique in the group.', example='ApiName'),
  appCodeAuthType?: string(name='AppCodeAuthType', description='If **AuthType** is set to **APP**, the valid values are:

*   **DEFAULT**: The default value that is used if no other values are passed. This value means that the setting of the group is used.
*   **DISABLE**: The authentication is disabled.
*   **HEADER**: AppCode can be placed in the Header parameter for authentication.
*   **HEADER_QUERY**: AppCode can be placed in the Header or Query parameter for authentication.', example='HEADER'),
  authType?: string(name='AuthType', description='The security authentication method of the API. Valid values:

*   **APP**: Only authorized applications can call the API.

*   **ANONYMOUS**: The API can be anonymously called. In this mode, you must take note of the following rules:

    *   All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If you make this API public, set API-specific throttling policies.
    *   We recommend that you do not make the API whose security authentication method is ANONYMOUS available in Alibaba Cloud Marketplace because API Gateway cannot meter calls on the caller or limit the number of calls on the API. If you want to make the API group to which the API belongs available in Alibaba Cloud Marketplace, we recommend that you move the API to another group, set its type to PRIVATE, or set its security authentication method to APP.

*   **APPOPENID**: The OpenID Connect account authentication method is used. Only applications authorized by OpenID Connect can call the API. If this method is selected, the OpenIdConnectConfig parameter is required.', example='APP'),
  backendConfig?: {
    backendId?: string(name='BackendId', description='The ID of the backend service.', example='0038e00c3dca44fcba3a94015d8f5bbf'),
    backendName?: string(name='BackendName', description='The name of the backend service.', example='testoss'),
    backendType?: string(name='BackendType', description='Backend service type', example='HTTP'),
  }(name='BackendConfig', description='Backend configurations'),
  backendEnable?: boolean(name='BackendEnable', description='Specifies whether to enable backend services.', example='true'),
  constantParameters?: {
    constantParameter?: [ 
    {
      constantValue?: string(name='ConstantValue', description='The constant parameter value.', example='constance'),
      description?: string(name='Description', description='The parameter description.', example='constance'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='constance'),
    }
  ](name='ConstantParameter')
  }(name='ConstantParameters', description='System parameters sent by API Gateway to the backend service'),
  createdTime?: string(name='CreatedTime', description='The creation time of the API.', example='2016-07-28T09:50:43Z'),
  customSystemParameters?: {
    customSystemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='The example value.', example='192.168.1.1'),
      description?: string(name='Description', description='The parameter description.', example='Client IP Address'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The name of the system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, and CaProxy.', example='CaClientIp'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='CustomSystemParameter')
  }(name='CustomSystemParameters', description='Custom system parameters'),
  deployedInfos?: {
    deployedInfo?: [ 
    {
      deployedStatus?: string(name='DeployedStatus', description='The deployment status. Valid values: DEPLOYED and NONDEPLOYED.', example='DEPLOYED'),
      effectiveVersion?: string(name='EffectiveVersion', description='The effective version.', example='xxx'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values: RELEASE and TEST.', example='RELEASE'),
    }
  ](name='DeployedInfo')
  }(name='DeployedInfos', description='The API publishing status.'),
  description?: string(name='Description', description='The description of the API.', example='Api description'),
  disableInternet?: boolean(name='DisableInternet', description='Specifies whether to limit API calls to within the VPC. Valid values:

*   **true**: Only API calls from the VPC are supported.
*   **false**: API calls from the VPC and Internet are both supported.', example='false'),
  errorCodeSamples?: {
    errorCodeSample?: [ 
    {
      code?: string(name='Code', description='The returned error code.', example='400'),
      description?: string(name='Description', description='The error description.', example='The UserId parameter is missing from the request.'),
      message?: string(name='Message', description='The returned error message.', example='Missing the parameter UserId'),
      model?: string(name='Model', description='The model.', example='[\\\\"*\\\\"]'),
    }
  ](name='ErrorCodeSample')
  }(name='ErrorCodeSamples', description='The sample error codes returned by the backend service.'),
  failResultSample?: string(name='FailResultSample', description='The sample error response from the backend service.', example='400'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='Specifies whether to carry the header : X-Ca-Nonce when calling an API. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent reply attacks. Valid values:

*   **true**: This field is forcibly checked when an API is requested to prevent replay attacks.
*   **false**: This field is not checked.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  groupName?: string(name='GroupName', description='The name of the API group.', example='ApiTest'),
  mock?: string(name='Mock', description='Specifies whether to enable the Mock mode. Valid values:

*   OPEN: The Mock mode is enabled.
*   CLOSED: The Mock mode is not enabled.', example='CLOSED'),
  mockResult?: string(name='MockResult', description='The result returned for service mocking.', example='test result'),
  modifiedTime?: string(name='ModifiedTime', description='The last modification time of the API.', example='2016-07-28T13:13:12Z'),
  openIdConnectConfig?: {
    idTokenParamName?: string(name='IdTokenParamName', description='The name of the parameter that corresponds to the token.', example='xxx'),
    openIdApiType?: string(name='OpenIdApiType', description='The OpenID Connect mode. Valid values:

*   **IDTOKEN**: indicates the APIs that are called by clients to obtain tokens. If you specify this value, the PublicKeyId parameter and the PublicKey parameter are required.
*   **BUSINESS**: indicates business APIs. Tokens are used to call the business APIs. If you specify this value, the IdTokenParamName parameter is required.', example='IDTOKEN'),
    publicKey?: string(name='PublicKey', description='The public key.', example='EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92'),
    publicKeyId?: string(name='PublicKeyId', description='The ID of the public key.', example='88483727556929326703309904351185815489'),
  }(name='OpenIdConnectConfig', description='Configuration items of the third-party OpenID Connect authentication method'),
  regionId?: string(name='RegionId', description='The region ID of the API.', example='cn-qingdao'),
  requestConfig?: {
    bodyFormat?: string(name='BodyFormat', description='This parameter takes effect only when the RequestMode parameter is set to MAPPING.********

The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams.', example='STREAM'),
    bodyModel?: string(name='BodyModel', description='The body model.', example='https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab'),
    escapePathParam?: boolean(name='EscapePathParam', description='Whether to escape the Path parameter, if true, the [param] on the Path will be treated as a regular character.', example='true'),
    postBodyDescription?: string(name='PostBodyDescription', description='The description of the request body.', example='fwefwef'),
    requestHttpMethod?: string(name='RequestHttpMethod', description='The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    requestMode?: string(name='RequestMode', description='The request mode. Valid values: MAPPING and PASSTHROUGH.', example='MAPPING'),
    requestPath?: string(name='RequestPath', description='The API request path. If the complete API URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the API request path is ` /object/add  `.', example='/api/billing/test/[type]'),
    requestProtocol?: string(name='RequestProtocol', description='The protocol type supported by the API. Valid values: HTTP and HTTPS. Separate multiple values with commas (,), such as "HTTP,HTTPS".', example='HTTP'),
  }(name='RequestConfig', description='The configuration items of API requests sent by the consumer to API Gateway.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D0FF585F-7966-40CF-BC60-75DB070B23D5<'),
  requestParameters?: {
    requestParameter?: [ 
    {
      apiParameterName?: string(name='ApiParameterName', description='The parameter name.', example='age'),
      arrayItemsType?: string(name='ArrayItemsType', description='The type of the array element.', example='String'),
      defaultValue?: string(name='DefaultValue', description='The default value.', example='20'),
      demoValue?: string(name='DemoValue', description='The example value.', example='20'),
      description?: string(name='Description', description='The parameter description.', example='Age'),
      docOrder?: int32(name='DocOrder', description='The order in which the parameter is sorted in the document.', example='0'),
      docShow?: string(name='DocShow', description='Indicates whether the document is public. Valid values: **PUBLIC** and **PRIVATE**.', example='PUBLIC'),
      enumValue?: string(name='EnumValue', description='The hash values that are supported when **ParameterType** is set to Int, Long, Float, Double, or String. Separate values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F.', example='boy,girl'),
      jsonScheme?: string(name='JsonScheme', description='The JSON Schema used for JSON validation when **ParameterType** is set to String.', example='JSON'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      maxLength?: long(name='MaxLength', description='The maximum parameter length when **ParameterType** is set to String.', example='123456'),
      maxValue?: long(name='MaxValue', description='The maximum parameter value when **ParameterType** is set to Int, Long, Float, or Double.', example='123456'),
      minLength?: long(name='MinLength', description='The minimum parameter length when **ParameterType** is set to String.', example='123456'),
      minValue?: long(name='MinValue', description='The minimum parameter value when **ParameterType** is set to Int, Long, Float, or Double.', example='123456'),
      parameterType?: string(name='ParameterType', description='The data type of the parameter. Valid values: String, Int, Long, Float, Double, and Boolean.', example='String'),
      regularExpression?: string(name='RegularExpression', description='The regular expression that is used for parameter validation when **ParameterType** is set to String.', example='xxx'),
      required?: string(name='Required', description='Indicates whether the parameter is required. Valid values: **REQUIRED** and **OPTIONAL**.', example='OPTIONAL'),
    }
  ](name='RequestParameter')
  }(name='RequestParameters', description='The parameters of API requests sent by the consumer to API Gateway.'),
  resultBodyModel?: string(name='ResultBodyModel', description='The returned description of the API.', example='{}'),
  resultSample?: string(name='ResultSample', description='The sample response from the backend service.', example='200'),
  resultType?: string(name='ResultType', description='The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML.', example='JSON'),
  serviceConfig?: {
    aoneAppName?: string(name='AoneAppName', description='The application name in AONE.', example='ib-blank'),
    contentTypeCatagory?: string(name='ContentTypeCatagory', description='The ContentType header type used when you call the backend service over HTTP.

*   **DEFAULT**: the default header type in API Gateway
*   **CUSTOM**: a custom header type
*   **CLIENT**: the ContentType header type of the client', example='CUSTOM'),
    contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/x-www-form-urlencoded; charset=UTF-8'),
    eventBridgeConfig?: {
      eventBridgeRegionId?: string(name='EventBridgeRegionId', description='The ID of the region where the EventBridge instance is located.', example='cn-beijing'),
      eventBus?: string(name='EventBus', description='The event bus.', example='testBus'),
      eventSource?: string(name='EventSource', description='The event source.', example='baas_driver'),
      roleArn?: string(name='RoleArn', description='The Arn that is authorized by a RAM user to EventBridge.', example='acs:ram::1933122015759***:role/adminoidcaliyun'),
    }(name='EventBridgeConfig', description='Configuration items of EventBridge'),
    functionComputeConfig?: {
      contentTypeCatagory?: string(name='ContentTypeCatagory', description='The ContentType header type used when you call the backend service over HTTP.

*   **DEFAULT**: the default header type in API Gateway
*   **CUSTOM**: a custom header type
*   **CLIENT**: the ContentType header type of the client', example='DEFAULT'),
      contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/x-www-form-urlencoded; charset=UTF-8'),
      fcBaseUrl?: string(name='FcBaseUrl', description='The root path of Function Compute.', example='https://1227****64334133.ap-southeast-1-int***al.fc.aliyuncs.com/201****-15/proxy/test****ice.LATEST/testHttp/'),
      fcType?: string(name='FcType', description='The type of the Function Compute instance.', example='HttpTrigger'),
      fcVersion?: string(name='FcVersion'),
      functionName?: string(name='FunctionName', description='The function name defined in Function Compute.', example='edge_function'),
      method?: string(name='Method', description='The request method.', example='GET'),
      onlyBusinessPath?: boolean(name='OnlyBusinessPath', description='The backend only receives the service path.', example='false'),
      path?: string(name='Path', description='The API request path.', example='/api/offline/cacheData'),
      qualifier?: string(name='Qualifier', description='The alias of the function.', example='2'),
      regionId?: string(name='RegionId', description='The region where the Function Compute instance is located.', example='cn-qingdao'),
      roleArn?: string(name='RoleArn', description='The Alibaba Cloud Resource Name (ARN) of the RAM role to be assumed by API Gateway to access Function Compute.', example='acs:ram::111***:role/aliyunserviceroleforsas'),
      serviceName?: string(name='ServiceName', description='The service name defined in Function Compute.', example='fcservicename'),
      triggerName?: string(name='TriggerName', description='The name of the trigger.

You can specify the TriggerName or TriggerUrl parameter. The TriggerName parameter is optional.', example='test1'),
    }(name='FunctionComputeConfig', description='Backend configuration items when the backend service is Function Compute'),
    mock?: string(name='Mock', description='Specifies whether to enable the Mock mode. Valid values:

*   **TRUE**: The Mock mode is enabled.
*   **FALSE**: The Mock mode is not enabled.', example='TRUE'),
    mockHeaders?: {
      mockHeader?: [ 
      {
        headerName?: string(name='HeaderName', description='The HTTP header.', example='Content-Length'),
        headerValue?: string(name='HeaderValue', description='The value of the HTTP header.', example='86400'),
      }
    ](name='MockHeader')
    }(name='MockHeaders', description='The simulated headers.'),
    mockResult?: string(name='MockResult', description='The result returned when the Mock mode is enabled.', example='test result'),
    mockStatusCode?: int32(name='MockStatusCode', description='The status code returned for service mocking.', example='200'),
    ossConfig?: {
      action?: string(name='Action', description='The operation options on OSS. Valid values:

*   GetObject
*   PostObject
*   DeleteObject
*   PutObject
*   HeadObject
*   GetObjectMeta
*   AppendObject', example='GetObject'),
      bucketName?: string(name='BucketName', description='The OSS bucket.', example='cbg-db'),
      key?: string(name='Key', description='The stored object or folder path.', example='/folder/test.json'),
      ossRegionId?: string(name='OssRegionId', description='The ID of the region where the OSS instance is located.', example='cn-hangzhou'),
    }(name='OssConfig', description='The information returned when the backend service is Object Storage Service (OSS).'),
    serviceAddress?: string(name='ServiceAddress', description='The URL used to call the back-end service. If the complete back-end service URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the value of ServiceAddress is **http://api.a.com:8080**.``', example='http://api.a.com:8080'),
    serviceHttpMethod?: string(name='ServiceHttpMethod', description='The HTTP method used to call a backend service. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    servicePath?: string(name='ServicePath', example='/object/add'),
    serviceProtocol?: string(name='ServiceProtocol', description='The protocol used by the backend service. Valid values: HTTP and HTTPS.', example='HTTP'),
    serviceTimeout?: int32(name='ServiceTimeout', description='The timeout period of the backend service. Unit: milliseconds.', example='1000'),
    serviceVpcEnable?: string(name='ServiceVpcEnable', description='Specifies whether to enable the VPC channel. Valid values:

*   **TRUE**: The VPC channel is enabled. You must create the corresponding VPC access authorization before you can enable a VPC channel.
*   **FALSE**: The VPC channel is not enabled.', example='TRUE'),
    vpcConfig?: {
      instanceId?: string(name='InstanceId', description='The ID of the ECS or SLB instance in the VPC.', example='i-bp1h497hkijewv2***'),
      name?: string(name='Name', description='The name of the VPC access authorization.', example='glmall-app-test'),
      port?: int32(name='Port', description='The port number that corresponds to the instance.', example='8080'),
      vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2zeafsc3fygk1***'),
      vpcScheme?: string(name='VpcScheme', description='The VPC protocol.', example='HTTP'),
    }(name='VpcConfig', description='Configuration items related to VPC channels'),
  }(name='ServiceConfig', description='The configuration items of API requests that API Gateway sends to the backend service.'),
  serviceParameters?: {
    serviceParameter?: [ 
    {
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterType?: string(name='ParameterType', description='The data type of the parameter. Valid values: STRING, NUMBER, and BOOLEAN.', example='String'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='ServiceParameter')
  }(name='ServiceParameters', description='The parameters of API requests sent by API Gateway to the backend service.'),
  serviceParametersMap?: {
    serviceParameterMap?: [ 
    {
      requestParameterName?: string(name='RequestParameterName', description='The corresponding frontend parameter name. The value must be contained in RequestParametersObject and match RequestParam.ApiParameterName.', example='sex'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='sex'),
    }
  ](name='ServiceParameterMap')
  }(name='ServiceParametersMap', description='The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.'),
  systemParameters?: {
    systemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='The example value.', example='192.168.1.1'),
      description?: string(name='Description', description='The parameter description.', example='Client IP Address'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, and CaProxy.', example='CaClientIp'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='SystemParameter')
  }(name='SystemParameters', description='System parameters sent by API Gateway to the backend service'),
  tagList?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='Label key.', example='APP'),
      tagValue?: string(name='TagValue', description='Label value.', example='value3'),
    }
  ](name='Tag')
  }(name='TagList', description='Tag List.'),
  visibility?: string(name='Visibility', description='Specifies whether to make the API public. Valid values:

*   **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.
*   **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.', example='PUBLIC'),
  webSocketApiType?: string(name='WebSocketApiType', description='The type of the two-way communication API.

*   **COMMON**: common API
*   **REGISTER**: registered API
*   **UNREGISTER**: unregistered API
*   **NOTIFY**: downstream notification API', example='COMMON'),
}

model DescribeApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiResponseBody(name='body'),
}

/**
 * @summary Queries the definition of an API.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiResponse
 */
async function describeApiWithOptions(request: DescribeApiRequest, runtime: Util.RuntimeOptions): DescribeApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the definition of an API.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiRequest
 * @return DescribeApiResponse
 */
async function describeApi(request: DescribeApiRequest): DescribeApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiWithOptions(request, runtime);
}

model DescribeApiDocRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='123'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment name. Valid values:

*   **RELEASE**
*   **TEST**

If this parameter is not specified, the default value RELEASE is used.', example='RELEASE'),
}

model DescribeApiDocResponseBody = {
  apiId?: string(name='ApiId', description='The ID of the API.', example='b24be7e59a104e52bffbf432cc9272af'),
  apiName?: string(name='ApiName', description='The name of the API', example='ObtainKeywordQRCodeAddress'),
  authType?: string(name='AuthType', description='The security authentication method. Valid values: APP, ANONYMOUS, and APPOPENID, indicating respectively Alibaba Cloud application authentication, anonymous authentication, and third-party OpenID Connect account authentication.', example='APP'),
  deployedTime?: string(name='DeployedTime', description='The publishing time.', example='2022-07-13T16:00:33Z'),
  description?: string(name='Description', description='The API description.', example='Lynk\\\\&Co Digital Mall OMS-UAT'),
  disableInternet?: boolean(name='DisableInternet', description='*   Specifies whether to set **DisableInternet** to **true** to limit API calls to within the VPC.
*   If you set **DisableInternet** to **false**, the limit is lifted. The default value is false when you create an API.', example='true'),
  errorCodeSamples?: {
    errorCodeSample?: [ 
    {
      code?: string(name='Code', description='The returned error code.', example='Error'),
      description?: string(name='Description', description='The error description.', example='Unauthorized'),
      message?: string(name='Message', description='The returned error message.', example='error message'),
    }
  ](name='ErrorCodeSample')
  }(name='ErrorCodeSamples', description='The sample error codes returned by the backend service.'),
  failResultSample?: string(name='FailResultSample', description='The sample error response from the backend service.', example='{"errorCode":"fail","errorMessage":"param invalid"}'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If you set **ForceNonceCheck** to **false**, the check is not performed. The default value is false when you create an API.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='f51d08c5b7c84342905544ebaec26d35'),
  groupName?: string(name='GroupName', description='The name of the API group.', example='Member Age Transaction Service'),
  regionId?: string(name='RegionId', description='The region ID of the API group.', example='cn-hangzhou'),
  requestConfig?: {
    bodyFormat?: string(name='BodyFormat', description='This parameter takes effect only when the RequestMode parameter is set to MAPPING.********

The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams.', example='STREAM'),
    escapePathParam?: boolean(name='EscapePathParam', description='Whether to escape the Path parameter, if true, the [param] on the Path will be treated as a regular character.', example='true'),
    postBodyDescription?: string(name='PostBodyDescription', description='The description of the request body.', example='fwefwef'),
    requestHttpMethod?: string(name='RequestHttpMethod', description='The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    requestMode?: string(name='RequestMode', description='The request mode. Valid values:

*   MAPPING: Parameters are mapped. Unknown parameters are filtered out.
*   PASSTHROUGH: Parameters are passed through.
*   MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.', example='MAPPING'),
    requestPath?: string(name='RequestPath', description='The API request path. If the complete API URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the API request path is ` /object/add  `.', example='/api/billing/test/[type]'),
    requestProtocol?: string(name='RequestProtocol', description='The protocol type supported by the API. Valid values: HTTP and HTTPS. Separate multiple values with commas (,), such as "HTTP,HTTPS".', example='HTTP'),
  }(name='RequestConfig', description='The returned API frontend definition. It is an array consisting of RequestConfig data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='F253FB5F-9AE1-5DDA-99B5-46BE00A3719E'),
  requestParameters?: {
    requestParameter?: [ 
    {
      apiParameterName?: string(name='ApiParameterName', description='The name of the parameter in the API request.', example='Length'),
      arrayItemsType?: string(name='ArrayItemsType', description='The type of the array element.', example='String'),
      defaultValue?: string(name='DefaultValue', description='The default value.', example='20'),
      demoValue?: string(name='DemoValue', description='The example value.', example='20'),
      description?: string(name='Description', description='The parameter description.', example='Parameters'),
      docOrder?: int32(name='DocOrder', description='The order in which the parameter is sorted in the document.', example='0'),
      docShow?: string(name='DocShow', description='Indicates whether the document is public. Valid values: **PUBLIC** and **PRIVATE**.', example='PUBLIC'),
      enumValue?: string(name='EnumValue', description='The hash values that are supported when **ParameterType** is set to Int, Long, Float, Double, or String. Separate values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F.', example='boy,girl'),
      jsonScheme?: string(name='JsonScheme', description='JSON scheme', example='{}'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      maxLength?: long(name='MaxLength', description='The maximum length.', example='123456'),
      maxValue?: long(name='MaxValue', description='The maximum value.', example='200'),
      minLength?: long(name='MinLength', description='The minimum length.', example='2'),
      minValue?: long(name='MinValue', description='The minimum value.', example='123456'),
      parameterType?: string(name='ParameterType', description='The data type of the parameter.', example='String'),
      regularExpression?: string(name='RegularExpression', description='The regular expression that is used for parameter validation when **ParameterType** is set to String.', example='xxx'),
      required?: string(name='Required', description='Indicates whether the parameter is required.', example='OPTIONAL'),
    }
  ](name='RequestParameter')
  }(name='RequestParameters', description='The returned frontend input parameters in the API. It is an array consisting of RequestParameter data.'),
  resultSample?: string(name='ResultSample', description='The sample response.', example='{\\\\n  \\\\"status\\\\": 0,\\\\n  \\\\"data\\\\": {\\\\n    \\\\"count\\\\": 1,\\\\n    \\\\"list\\\\": [\\\\n      \\\\"352\\\\"\\\\n    ]\\\\n  },\\\\n  \\\\"message\\\\": \\\\"success\\\\"\\\\n}'),
  resultType?: string(name='ResultType', description='The return value type.', example='JSON'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
  visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values: PUBLIC and PRIVATE.', example='PUBLIC'),
}

model DescribeApiDocResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiDocResponseBody(name='body'),
}

/**
 * @summary Queries the documentation of an API.
 *
 * @description *   For API callers, the specified API must be a public or authorized private API that has been published to a runtime environment.
 * *   When you call this operation as an API caller, the service information, parameter definitions, and other details of the API you specify are returned.
 * *   When you call this operation as an API provider, the definition of the specified API running in the specified runtime environment is returned. The returned definition takes effect in the runtime environment, and may be different from the definition of the API you modify.
 * *   Before you call this operation as an API provider, ensure that the API to be queried is a public one or that your application has been authorized to call the API, because authentication on API callers is required.
 *
 * @param request DescribeApiDocRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiDocResponse
 */
async function describeApiDocWithOptions(request: DescribeApiDocRequest, runtime: Util.RuntimeOptions): DescribeApiDocResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiDoc',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the documentation of an API.
 *
 * @description *   For API callers, the specified API must be a public or authorized private API that has been published to a runtime environment.
 * *   When you call this operation as an API caller, the service information, parameter definitions, and other details of the API you specify are returned.
 * *   When you call this operation as an API provider, the definition of the specified API running in the specified runtime environment is returned. The returned definition takes effect in the runtime environment, and may be different from the definition of the API you modify.
 * *   Before you call this operation as an API provider, ensure that the API to be queried is a public one or that your application has been authorized to call the API, because authentication on API callers is required.
 *
 * @param request DescribeApiDocRequest
 * @return DescribeApiDocResponse
 */
async function describeApiDoc(request: DescribeApiDocRequest): DescribeApiDocResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiDocWithOptions(request, runtime);
}

model DescribeApiGroupRequest {
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='appname'),
      value?: string(name='Value', description='The value of the tag.', example='test_app'),
    }
  ](name='Tag', description='The object tags that match the lifecycle rule. You can specify multiple tags.', example='Key， Value'),
}

model DescribeApiGroupResponseBody = {
  basePath?: string(name='BasePath', description='The root path of the API.', example='/qqq'),
  billingStatus?: string(name='BillingStatus', description='The billing status of the API group.

*   **NORMAL**: The API group is normal.
*   **LOCKED**: The API group is locked due to overdue payments.', example='NORMAL'),
  cloudMarketCommodity?: boolean(name='CloudMarketCommodity', description='The products on Alibaba Cloud Marketplace.', example='false'),
  cmsMonitorGroup?: string(name='CmsMonitorGroup', description='The CloudMonitor application group.', example='217008423'),
  compatibleFlags?: string(name='CompatibleFlags', description='The list of associated tags. Separate multiple tags with commas (,).', example='depart:dep1'),
  createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the API group.', example='2016-08-01T06:53:02Z'),
  customAppCodeConfig?: string(name='CustomAppCodeConfig', description='The custom appcode configuration.', example='{"location":"HEADER","name":"myAppCodeHeader"}'),
  customDomains?: {
    domainItem?: [ 
    {
      bindStageAlias?: string(name='BindStageAlias', description='The alias of the associated environment.', example='TEST1'),
      bindStageName?: string(name='BindStageName', description='The environment in which the associated API group runs.', example='TEST'),
      certificateId?: string(name='CertificateId', description='The SSL certificate ID, which is automatically generated by the system.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
      certificateName?: string(name='CertificateName', description='The name of the SSL certificate.', example='myCertificate'),
      certificateValidEnd?: long(name='CertificateValidEnd', description='The time when the certificate expires.', example='2635123476000'),
      certificateValidStart?: long(name='CertificateValidStart', description='The time when the certificate takes effect.', example='1689043476000'),
      customDomainType?: string(name='CustomDomainType', description='The type of the custom domain name.', example='intranet'),
      domainBindingStatus?: string(name='DomainBindingStatus', description='The binding status of the custom domain name. Valid values:

*   **BINDING**: The domain name is bound.
*   **BOUND**: The domain name is not bound.', example='BINDING'),
      domainCNAMEStatus?: string(name='DomainCNAMEStatus', description='The domain name resolution status. Valid values:

*   **RESOLVED**
*   **UNRESOLVED**', example='RESOLVED'),
      domainLegalStatus?: string(name='DomainLegalStatus', description='The validity status of the domain name. Valid values:

*   **NORMAL**: The domain name is valid.
*   **ABNORMAL**: The domain name is invalid. This status affects API calls and needs to be rectified as soon as possible.', example='ABNORMAL'),
      domainName?: string(name='DomainName', description='The domain name.', example='api.demo.com'),
      domainRemark?: string(name='DomainRemark', description='Remarks about the domain name, such as the cause of an exception.', example='Indicates that the domain name does not have an ICP filing.'),
      domainWebSocketStatus?: string(name='DomainWebSocketStatus', description='The status of the domain that uses the WebSocket feature.', example='CLOSE'),
      isHttpRedirectToHttps?: boolean(name='IsHttpRedirectToHttps', description='Indicates whether to redirect HTTP requests to HTTPS.', example='false'),
      wildcardDomainPatterns?: string(name='WildcardDomainPatterns', description='The wildcard domain name mode.', example='[\\\\"{test}.test.com\\\\"]'),
    }
  ](name='DomainItem')
  }(name='CustomDomains', description='The details about the custom domain name.'),
  customTraceConfig?: string(name='CustomTraceConfig', description='The custom trace configuration.', example='{\\\\"parameterLocation\\\\":\\\\"HEADER\\\\",\\\\"parameterName\\\\":\\\\"traceId\\\\"}'),
  customerConfigs?: string(name='CustomerConfigs', description='The list of custom configuration items.', example='removeResponseServerHeader'),
  dedicatedInstanceType?: string(name='DedicatedInstanceType', description='The type of exclusive instance where the group is located

- VPC fusion type exclusive instance: vpc_connect
- Traditional type exclusive instance: normal', example='normal'),
  defaultDomain?: string(name='DefaultDomain', description='The default domain name.', example='mkt.api.gaore.com'),
  description?: string(name='Description', description='The description of the API group.', example='New weather informations.'),
  disableInnerDomain?: boolean(name='DisableInnerDomain', description='Indicates whether access over the public second-level domain name is enabled. Valid values:

*   true
*   false', example='false'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  groupName?: string(name='GroupName', description='The name of the group to which the API belongs.', example='NewWeather'),
  httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS policy.', example='HTTPS2_TLS1_0'),
  illegalStatus?: string(name='IllegalStatus', description='The validity status of the API group. Valid values:

*   **NORMAL**: The API group is normal.
*   **LOCKED**: The API group is locked because it is not valid.', example='NORMAL'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.', example='apigateway-cn-v6419k43xxxxx'),
  instanceType?: string(name='InstanceType', description='The type of the instance.

*   CLASSIC_SHARED: shared instance that uses the classic network configuration
*   VPC_SHARED: shared instance that uses VPC
*   VPC_DEDICATED: dedicated instance that uses VPC', example='VPC_SHARED'),
  ipv6Status?: string(name='Ipv6Status', description='The IPv6 status.', example='UNBIND'),
  migrationError?: string(name='MigrationError', description='The reason for the failure of the group migration instance task. When the value of the MigrationStatus parameter is Failed, it is not empty.', example='The current instance conflicts with the target instance.'),
  migrationStatus?: string(name='MigrationStatus', description='Group migration instance task status

- Running
- Success
- Failed', example='Fail'),
  modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the API group.', example='2016-08-01T06:54:32Z'),
  passthroughHeaders?: string(name='PassthroughHeaders', description='Specifies whether to pass headers.', example='eagleeye-rpcid,x-b3-traceid'),
  regionId?: string(name='RegionId', description='The region to which the API group belongs.', example='cn-hangzhou'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03442A3D-3B7D-434C-8A95-A5FEB989B519'),
  stageItems?: {
    stageInfo?: [ 
    {
      description?: string(name='Description', description='The environment description.', example='MYTEST'),
      stageId?: string(name='StageId', description='The environment ID.', example='123e8dc7bbe01613b5b1d726c2a7888e'),
      stageName?: string(name='StageName', description='The environment name.', example='TEST'),
    }
  ](name='StageInfo')
  }(name='StageItems', description='The runtime environment information.'),
  status?: string(name='Status', description='The status of the API group.

*   **NORMAL**: The API group is normal.
*   **DELETE**: The API group is deleted.', example='NORMAL'),
  subDomain?: string(name='SubDomain', description='The second-level domain name automatically assigned to the API group.', example='27d50c0f2e54b359919923d908bb015-cn-hangzhou.alicloudapi.com'),
  trafficLimit?: int32(name='TrafficLimit', description='The upper QPS limit of the API group. The default value is 500. You can increase the upper limit by submitting an application.', example='500'),
  userLogConfig?: string(name='UserLogConfig', description='The user log settings.', example='{\\\\"requestBody\\\\":true,\\\\"responseBody\\\\":true,\\\\"queryString\\\\":\\\\"test\\\\",\\\\"requestHeaders\\\\":\\\\"test\\\\",\\\\"responseHeaders\\\\":\\\\"test\\\\",\\\\"jwtClaims\\\\":\\\\"test\\\\"}'),
  vpcDomain?: string(name='VpcDomain', description='The VPC domain name.', example='e4****7151954***acbd9f7****1058a-ap-southeast-1-vpc.alicloudapi.com'),
  vpcSlbIntranetDomain?: string(name='VpcSlbIntranetDomain', description='The VPC SLB domain name.', example='257e9d450e924d00b976b0ecfb7184c2-cn-beijing-intranet.alicloudapi.com'),
}

model DescribeApiGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiGroupResponseBody(name='body'),
}

/**
 * @summary You can call this operation to query details about an API group, including the automatically assigned second-level domain name, custom domain name, and SSL certificate.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiGroupResponse
 */
async function describeApiGroupWithOptions(request: DescribeApiGroupRequest, runtime: Util.RuntimeOptions): DescribeApiGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary You can call this operation to query details about an API group, including the automatically assigned second-level domain name, custom domain name, and SSL certificate.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiGroupRequest
 * @return DescribeApiGroupResponse
 */
async function describeApiGroup(request: DescribeApiGroupRequest): DescribeApiGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiGroupWithOptions(request, runtime);
}

model DescribeApiGroupVpcWhitelistRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='f6c64214dc27400196eef954575d60d3'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApiGroupVpcWhitelistResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
  vpcIds?: string(name='VpcIds', description='The ID of the VPC.', example='vpc-bp11w979o2s9rcr962w25'),
}

model DescribeApiGroupVpcWhitelistResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiGroupVpcWhitelistResponseBody(name='body'),
}

/**
 * @summary Queries the VPC whitelist that is allowed to access an API group.
 *
 * @param request DescribeApiGroupVpcWhitelistRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiGroupVpcWhitelistResponse
 */
async function describeApiGroupVpcWhitelistWithOptions(request: DescribeApiGroupVpcWhitelistRequest, runtime: Util.RuntimeOptions): DescribeApiGroupVpcWhitelistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiGroupVpcWhitelist',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the VPC whitelist that is allowed to access an API group.
 *
 * @param request DescribeApiGroupVpcWhitelistRequest
 * @return DescribeApiGroupVpcWhitelistResponse
 */
async function describeApiGroupVpcWhitelist(request: DescribeApiGroupVpcWhitelistRequest): DescribeApiGroupVpcWhitelistResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiGroupVpcWhitelistWithOptions(request, runtime);
}

model DescribeApiGroupsRequest {
  basePath?: string(name='BasePath', description='The root path of the API.', example='/edmdgp/service20250116management01/v1'),
  enableTagAuth?: boolean(name='EnableTagAuth', description='Specifies whether to enable tag verification.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='be6d2abcc0dd4f749fc2d2edd6567164'),
  groupName?: string(name='GroupName', description='The keyword that can be specified in the name of the API group.', example='Traffic'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.', example='apigateway-cn-v6419k43245xx'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 50. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  sort?: string(name='Sort', description='The order. Valid values: asc and desc. Default value: desc.

*   asc: The API groups are displayed in ascending order of modification time.
*   desc: The API groups are displayed in descending order of modification time.', example='desc'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='key'),
      value?: string(name='Value', description='The value of the tag.', example='value'),
    }
  ](name='Tag', description='The list of tags.'),
}

model DescribeApiGroupsResponseBody = {
  apiGroupAttributes?: {
    apiGroupAttribute?: [ 
    {
      basePath?: string(name='BasePath', description='The basepath.', example='/v2/'),
      billingStatus?: string(name='BillingStatus', description='The billing status of the API group. Valid values:

*   **NORMAL**: The instance is normal.
*   **LOCKED**: The API group is locked due to overdue payments.', example='NORMAL'),
      createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the API group.', example='2016-08-01T08:45:15Z'),
      description?: string(name='Description', description='Group Description', example='TrafficInformations.'),
      groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='be6d2abcc0dd4f749fc2d2edd6567164'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='Traffic'),
      httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS security policy', example='HTTPS2_TLS1_0'),
      illegalStatus?: string(name='IllegalStatus', description='The validity status of the API group. Valid values:

*   **NORMAL**: The instance is normal.
*   **LOCKED**: The API group is locked because it is not valid.', example='NORMAL'),
      instanceId?: string(name='InstanceId', description='The ID of the instance.', example='apigateway-cn-v6419k43245xx'),
      instanceType?: string(name='InstanceType', description='The type of the instance.', example='VPC_SHARED'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the API group.', example='2016-08-01T08:45:15Z'),
      regionId?: string(name='RegionId', description='The region to which the API group belongs.', example='cn-hangzhou'),
      subDomain?: string(name='SubDomain', description='The second-level domain name that corresponds to the API group and is used by the CNAME of the custom domain name.', example='be6d2abcc0dd4f749fc2d2edd6567164-cn-hangzhou.alicloudapi.com'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The key of the tag.', example='key'),
          value?: string(name='Value', description='The value of the tag.', example='value'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The list of tags.'),
      trafficLimit?: int32(name='TrafficLimit', description='The upper QPS limit of the API group. The default value is 500. You can increase the upper limit by submitting an application.', example='500'),
    }
  ](name='ApiGroupAttribute')
  }(name='ApiGroupAttributes', description='The returned group set.'),
  pageNumber?: int32(name='PageNumber', description='The number of pages to return the results on.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeApiGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiGroupsResponseBody(name='body'),
}

/**
 * @summary Queries existing API groups and their basic information.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiGroupsResponse
 */
async function describeApiGroupsWithOptions(request: DescribeApiGroupsRequest, runtime: Util.RuntimeOptions): DescribeApiGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.basePath)) {
    query['BasePath'] = request.basePath;
  }
  if (!Util.isUnset(request.enableTagAuth)) {
    query['EnableTagAuth'] = request.enableTagAuth;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.sort)) {
    query['Sort'] = request.sort;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiGroups',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries existing API groups and their basic information.
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request DescribeApiGroupsRequest
 * @return DescribeApiGroupsResponse
 */
async function describeApiGroups(request: DescribeApiGroupsRequest): DescribeApiGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiGroupsWithOptions(request, runtime);
}

model DescribeApiHistoriesRequest {
  apiId?: string(name='ApiId', description='The ID of the API.', example='c076144d7878437b8f82fb85890ce6a0'),
  apiName?: string(name='ApiName', description='The name of the API. The name is used for fuzzy match.', example='weather'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='1084f9034c744137901057206b39d2b6'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
}

model DescribeApiHistoriesResponseBody = {
  apiHisItems?: {
    apiHisItem?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='5af418828f0344a3b588c0cc1331a3bc'),
      apiName?: string(name='ApiName', description='The name of the API.', example='CreateObject'),
      deployedTime?: string(name='DeployedTime', description='The publishing time (UTC) of the API.', example='2016-07-20T08:28:48Z'),
      description?: string(name='Description', description='The description of the API.', example='Creates an object'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='1084f9034c744137901057206b39d2b6'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='myGroup2'),
      historyVersion?: string(name='HistoryVersion', description='The historical version of the API.', example='20160705104552393'),
      regionId?: string(name='RegionId', description='The region in which the API is located.', example='cn-qingdao'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
      status?: string(name='Status', description='Indicates whether an API version is effective. Valid values: **ONLINE** and **OFFLINE**.', example='ONLINE'),
    }
  ](name='ApiHisItem')
  }(name='ApiHisItems', description='The returned API information. It is an array consisting of ApiHisItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='3'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='15'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ003'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='32'),
}

model DescribeApiHistoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiHistoriesResponseBody(name='body'),
}

/**
 * @summary Queries the historical versions of a specified API.
 *
 * @description *   This operation is intended for API providers. Only APIs that have been published have historical version records.
 * *   This operation allows you to obtain the historical versions of an API. This operation is always called by other operations.
 *
 * @param request DescribeApiHistoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiHistoriesResponse
 */
async function describeApiHistoriesWithOptions(request: DescribeApiHistoriesRequest, runtime: Util.RuntimeOptions): DescribeApiHistoriesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiHistories',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the historical versions of a specified API.
 *
 * @description *   This operation is intended for API providers. Only APIs that have been published have historical version records.
 * *   This operation allows you to obtain the historical versions of an API. This operation is always called by other operations.
 *
 * @param request DescribeApiHistoriesRequest
 * @return DescribeApiHistoriesResponse
 */
async function describeApiHistories(request: DescribeApiHistoriesRequest): DescribeApiHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiHistoriesWithOptions(request, runtime);
}

model DescribeApiHistoryRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='dc6e17ee3120404c839bbcd7622ab6ed'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='3013a55c0c44483f984d26df27120513'),
  historyVersion?: string(name='HistoryVersion', description='Specifies the version number that you want to query.

This parameter is required.', example='20211122155403834'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**: the test environment
*   **PRE**: the pre-release environment

This parameter is required.', example='RELEASE'),
}

model DescribeApiHistoryResponseBody = {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='If **AuthType** is set to **APP**, this value must be passed to specify the signature algorithm. If you do not specify a value, HmacSHA256 is used by default. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='HmacSHA256'),
  apiId?: string(name='ApiId', description='The ID of the API.', example='bebf996e4b3d445d83078094b72b0d91'),
  apiName?: string(name='ApiName', description='The name of the API.', example='Backstage_MengMeng Broadcast_Seven Niu Cloud Push Stream Callback_Official'),
  appCodeAuthType?: string(name='AppCodeAuthType', description='The AppCode authentication type supported. Valid values:

*   DEFAULT: supported after being made available in Alibaba Cloud Marketplace
*   DISABLE: not supported.
*   HEADER : supported only in the Header parameter
*   HEADER_QUERY : supported in the Header or Query parameter.', example='HEADER'),
  authType?: string(name='AuthType', description='The security authentication method of the API. Valid values:

*   **APP: Only authorized applications can call the API.**

*   **ANONYMOUS: The API can be anonymously called. In this mode, you must take note of the following rules:**

    *   All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If you make this API public, set API-specific throttling policies.', example='APP'),
  backendConfig?: {
    backendId?: string(name='BackendId', description='The ID of the backend service.', example='a0305308908c4740aba9cbfd63ba99b7'),
    backendName?: string(name='BackendName', description='The name of the backend service.', example='zmapi'),
    backendType?: string(name='BackendType', description='The type of the backend service.', example='HTTP'),
  }(name='BackendConfig', description='Backend configurations'),
  backendEnable?: boolean(name='BackendEnable', description='Specifies whether to enable backend services.', example='true'),
  constantParameters?: {
    constantParameter?: [ 
    {
      constantValue?: string(name='ConstantValue', description='The value of the constant parameter.', example='constance'),
      description?: string(name='Description', description='The parameter description.', example='for_test1'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='constance'),
    }
  ](name='ConstantParameter')
  }(name='ConstantParameters', description='The constant parameters.'),
  customSystemParameters?: {
    customSystemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='The sample value.', example='192.168.1.1'),
      description?: string(name='Description', description='The parameter description.', example='balabala'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The parameter name.', example='CaClientIp'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='CustomSystemParameter')
  }(name='CustomSystemParameters', description='The custom system parameters.'),
  deployedTime?: string(name='DeployedTime', description='The publishing time (UTC) of the API.', example='2021-06-1113:57:38'),
  description?: string(name='Description', description='The description of the API.', example='Queries weather based on the region name'),
  disableInternet?: boolean(name='DisableInternet', description='*   Specifies whether to set **DisableInternet** to **true** to limit API calls to within the VPC.
*   If you set **DisableInternet** to **false**, the limit is lifted. The default value is false when you create an API.', example='true'),
  errorCodeSamples?: {
    errorCodeSample?: [ 
    {
      code?: string(name='Code', description='The returned error code.', example='400'),
      description?: string(name='Description', description='The error description.', example='Missing the parameter UserId'),
      message?: string(name='Message', description='The returned error message.', example='MissingParameter'),
    }
  ](name='ErrorCodeSample')
  }(name='ErrorCodeSamples', description='The sample error codes returned by the backend service.

For more information, see [ErrorCodeSample](https://help.aliyun.com/document_detail/44392.html).'),
  failResultSample?: string(name='FailResultSample', description='The sample error response from the backend service.', example='{"errorCode":"fail","errorMessage":"param invalid"}'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If you set **ForceNonceCheck** to **false**, the check is not performed. The default value is false when you create an API.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='cfb6ef799bf54fffabb0f02019ad2581'),
  groupName?: string(name='GroupName', description='The name of the API group.', example='dev_api'),
  historyVersion?: string(name='HistoryVersion', description='The historical version number.', example='20211022134156663'),
  openIdConnectConfig?: {
    idTokenParamName?: string(name='IdTokenParamName', description='The name of the parameter that corresponds to the token.', example='xxx'),
    openIdApiType?: string(name='OpenIdApiType', description='The configuration of OpenID Connect authentication. Valid values:

*   **IDTOKEN: indicates the APIs that are called by clients to obtain tokens. If you specify this value, the PublicKeyId parameter and the PublicKey parameter are required.**
*   **BUSINESS: indicates business APIs. Tokens are used to call the business APIs. If you specify this value, the IdTokenParamName parameter is required.', example='IDTOKEN'),
    publicKey?: string(name='PublicKey', description='The public key of the API.', example='EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92'),
    publicKeyId?: string(name='PublicKeyId', description='The ID of the public key.', example='88483727556929326703309904351185815489'),
  }(name='OpenIdConnectConfig', description='The configuration items of the third-party OpenID Connect authentication method.'),
  regionId?: string(name='RegionId', description='The region where the API is located.', example='cn-hangzhou'),
  requestConfig?: {
    bodyFormat?: string(name='BodyFormat', description='The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams. This parameter takes effect only when the RequestMode parameter is set to MAPPING.', example='STREAM'),
    bodyModel?: string(name='BodyModel', description='The body model.', example='https://apigateway.aliyun.com/models/3a240a1XXXXXXXXd9ab1bf7e947b4095/9e2df550e85b4XXXXXXXX619eaab'),
    escapePathParam?: boolean(name='EscapePathParam', description='Whether to escape the Path parameter, if true, the [param] on the Path will be treated as a regular character.', example='true'),
    postBodyDescription?: string(name='PostBodyDescription', description='The description of the request body.', example='fwefwef'),
    requestHttpMethod?: string(name='RequestHttpMethod', description='The HTTP method. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    requestMode?: string(name='RequestMode', description='The request mode. Valid values:

*   MAPPING: Parameters are mapped. Unknown parameters are filtered out.
*   PASSTHROUGH: Parameters are passed through.
*   MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.', example='MAPPING'),
    requestPath?: string(name='RequestPath', description='API path', example='/api/billing/test/[type]'),
    requestProtocol?: string(name='RequestProtocol', description='The protocol type supported by the API. Valid values: HTTP, HTTPS, and WebSocket. Separate multiple values with commas (,), such as "HTTP,HTTPS".', example='HTTP'),
  }(name='RequestConfig', description='The configuration items of API requests sent by the consumer to API Gateway.

For more information, see [RequestConfig](https://help.aliyun.com/document_detail/43985.html).'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
  requestParameters?: {
    requestParameter?: [ 
    {
      apiParameterName?: string(name='ApiParameterName', description='The name of the parameter in the API request.', example='age'),
      arrayItemsType?: string(name='ArrayItemsType', description='The type of the array element.', example='String'),
      defaultValue?: string(name='DefaultValue', description='The default value.', example='20'),
      demoValue?: string(name='DemoValue', description='The sample value.', example='20'),
      description?: string(name='Description', description='The parameter description.', example='modidyTest'),
      docOrder?: int32(name='DocOrder', description='The order in which the parameter is sorted in the document.', example='0'),
      docShow?: string(name='DocShow', description='Indicates whether the document is public. Valid values: **PUBLIC** and **PRIVATE**.', example='PUBLIC'),
      enumValue?: string(name='EnumValue', description='The hash values that are supported when **ParameterType** is set to Int, Long, Float, Double, or String. Separate values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F.', example='boy,girl'),
      jsonScheme?: string(name='JsonScheme', description='JSON scheme', example='{}'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      maxLength?: long(name='MaxLength', description='The maximum parameter length when **ParameterType** is set to String.', example='123456'),
      maxValue?: long(name='MaxValue', description='The maximum parameter value when **ParameterType** is set to Int, Long, Float, or Double.', example='123456'),
      minLength?: long(name='MinLength', description='The minimum parameter length when **ParameterType** is set to String.', example='123456'),
      minValue?: long(name='MinValue', description='The minimum parameter value when **ParameterType** is set to Int, Long, Float, or Double.', example='123456'),
      parameterType?: string(name='ParameterType', description='The data type of the parameter. Valid values: String, Int, Long, Float, Double, and Boolean.', example='String'),
      regularExpression?: string(name='RegularExpression', description='The regular expression that is used for parameter validation when **ParameterType** is set to String.', example='xxx'),
      required?: string(name='Required', description='Indicates whether the parameter is required. Valid values: **REQUIRED** and **OPTIONAL**.', example='OPTIONAL'),
    }
  ](name='RequestParameter')
  }(name='RequestParameters', description='The parameters of API requests sent by the consumer to API Gateway.

For more information, see [RequestParameter](https://help.aliyun.com/document_detail/43986.html).'),
  resultBodyModel?: string(name='ResultBodyModel', description='The return description of the API.', example='{}'),
  resultDescriptions?: {
    resultDescription?: [ 
    {
      description?: string(name='Description', description='The subnode description.', example='for_test1'),
      hasChild?: boolean(name='HasChild', description='Indicates whether a subnode exists.', example='true'),
      id?: string(name='Id', description='The result ID.', example='id'),
      key?: string(name='Key', description='The primary key of the result.', example='groupName'),
      mandatory?: boolean(name='Mandatory', description='Indicates whether the parameter is required.', example='true'),
      name?: string(name='Name', description='The result name.', example='fwqf'),
      pid?: string(name='Pid', description='The ID of the parent node.', example='pid'),
      type?: string(name='Type', description='The result type.', example='String'),
    }
  ](name='ResultDescription')
  }(name='ResultDescriptions', description='The return description of the API.'),
  resultSample?: string(name='ResultSample', description='The sample response.', example='{\\\\n  \\\\"status\\\\": 0,\\\\n  \\\\"data\\\\": {\\\\n    \\\\"count\\\\": 1,\\\\n    \\\\"list\\\\": [\\\\n      \\\\"352\\\\"\\\\n    ]\\\\n  },\\\\n  \\\\"message\\\\": \\\\"success\\\\"\\\\n}'),
  resultType?: string(name='ResultType', description='The type of the data to return.', example='JSON'),
  serviceConfig?: {
    contentTypeCatagory?: string(name='ContentTypeCatagory', description='The ContentType header type used when you call the backend service over HTTP.

*   DEFAULT: the default header type in API Gateway
*   CUSTOM: a custom header type
*   CLIENT: the ContentType header type of the client', example='CUSTOM'),
    contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/json'),
    eventBridgeConfig?: {
      eventBridgeRegionId?: string(name='EventBridgeRegionId', description='The ID of the region where the EventBridge instance is located.', example='cn-beijing'),
      eventBus?: string(name='EventBus', description='The event bus.', example='testBus'),
      eventSource?: string(name='EventSource', description='The event source of the managed rule.', example='baas_driver'),
      roleArn?: string(name='RoleArn', description='The Arn that is authorized by a RAM user to EventBridge.', example='acs:ram::1933122015759***:role/adminoidcaliyun'),
    }(name='EventBridgeConfig', description='Configuration items of EventBridge'),
    functionComputeConfig?: {
      contentTypeCatagory?: string(name='ContentTypeCatagory', description='The ContentType header type used when you call the backend service over HTTP.

*   **DEFAULT: the default header type in API Gateway.**
*   **CUSTOM: a custom header type.**
*   **CLIENT: the ContentType header type of the client.', example='DEFAULT'),
      contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/json'),
      fcBaseUrl?: string(name='FcBaseUrl', description='The root path of Function Compute.', example='https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/'),
      fcType?: string(name='FcType', description='The type of the Function Compute instance.', example='HttpTrigger'),
      functionName?: string(name='FunctionName', description='The function name defined in Function Compute.', example='domain_business_control'),
      method?: string(name='Method', description='The request method.', example='GET'),
      onlyBusinessPath?: boolean(name='OnlyBusinessPath', description='The backend only receives the service path.', example='false'),
      path?: string(name='Path', description='The API request path.', example='/api/offline/cacheData'),
      qualifier?: string(name='Qualifier', description='The alias of the function.', example='2'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
      roleArn?: string(name='RoleArn', description='The Alibaba Cloud Resource Name (ARN) of the RAM role to be assumed by API Gateway to access Function Compute.', example='acs:ram::111***:role/aliyunserviceroleforsas'),
      serviceName?: string(name='ServiceName', description='The service name defined in Function Compute.', example='fcservicename'),
    }(name='FunctionComputeConfig', description='Backend configuration items when the backend service is Function Compute'),
    mock?: string(name='Mock', description='Specifies whether to enable the MOCK mode. Valid values:

*   TRUE: The Mock mode is enabled.
*   FALSE: The Mock mode is not enabled.', example='TRUE'),
    mockHeaders?: {
      mockHeader?: [ 
      {
        headerName?: string(name='HeaderName', description='The HTTP headers.', example='Content-Type'),
        headerValue?: string(name='HeaderValue', description='The values of the HTTP headers.', example='86400'),
      }
    ](name='MockHeader')
    }(name='MockHeaders', description='The simulated Headers.'),
    mockResult?: string(name='MockResult', description='The result returned when the Mock mode is enabled.', example='test result'),
    mockStatusCode?: int32(name='MockStatusCode', description='The status code returned for service mocking.', example='200'),
    ossConfig?: {
      action?: string(name='Action', description='The operation options on OSS. Valid values:

*   GetObject
*   PostObject
*   DeleteObject
*   PutObject
*   HeadObject
*   GetObjectMeta
*   AppendObject', example='GetObject'),
      bucketName?: string(name='BucketName', description='The OSS bucket.', example='phototest02'),
      key?: string(name='Key', description='The stored object or folder path.', example='ENV'),
      ossRegionId?: string(name='OssRegionId', description='The ID of the region where the OSS instance is located.', example='cn-hangzhou'),
    }(name='OssConfig', description='Information when the backend service is OSS'),
    serviceAddress?: string(name='ServiceAddress', description='The URL used to call the backend service.', example='http://api.a.com:8080'),
    serviceHttpMethod?: string(name='ServiceHttpMethod', description='The HTTP request method used when calling the backend service. Valid values: PUT, GET, POST, DELETE, PATCH, HEAD, OPTIONS, and ANY.', example='POST'),
    servicePath?: string(name='ServicePath', description='The path used when you call the backend service.', example='/object/add'),
    serviceProtocol?: string(name='ServiceProtocol', description='The backend service protocol. Currently, only HTTP, HTTPS, and FunctionCompute are supported.', example='HTTP'),
    serviceTimeout?: int32(name='ServiceTimeout', description='The timeout period of the backend service, in millisecond.', example='1000'),
    serviceVpcEnable?: string(name='ServiceVpcEnable', description='Specifies whether to enable the VPC channel. Valid values:

*   TRUE: The VPC channel is enabled.
*   FALSE: The VPC channel is not enabled.

You must create the corresponding VPC access authorization before you can enable a VPC channel.', example='TRUE'),
    vpcConfig?: {
      instanceId?: string(name='InstanceId', description='The IDs of the ELB and SLB instances in the VPC.', example='i-bp1h497hkijewv2***'),
      name?: string(name='Name', description='The name of the VPC.', example='glmall-app-test'),
      port?: int32(name='Port', description='The port number that corresponds to the instance.', example='8080'),
      vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2zeafsc3fygk1***'),
      vpcScheme?: string(name='VpcScheme', description='The VPC protocol.', example='HTTP'),
    }(name='VpcConfig', description='Configuration items related to VPC channels'),
    vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-uf6kg9x8sx2tbxxxx'),
  }(name='ServiceConfig', description='The information about a backend service call.'),
  serviceParameters?: {
    serviceParameter?: [ 
    {
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterType?: string(name='ParameterType', description='The data type of the parameter. Valid values: STRING, NUMBER, and BOOLEAN.', example='String'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='ServiceParameter')
  }(name='ServiceParameters', description='The parameters of API requests sent by API Gateway to the backend service.

For more information, see [ServiceParameter](https://help.aliyun.com/document_detail/43988.html).'),
  serviceParametersMap?: {
    serviceParameterMap?: [ 
    {
      requestParameterName?: string(name='RequestParameterName', description='The corresponding frontend parameter name. The value must be contained in RequestParametersObject and match RequestParam.ApiParameterName.', example='sex'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='sex'),
    }
  ](name='ServiceParameterMap')
  }(name='ServiceParametersMap', description='The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.

For more information, see [ServiceParameterMap](https://help.aliyun.com/document_detail/43989.html).'),
  stageName?: string(name='StageName', description='The environment in which the API is requested. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment', example='RELEASE'),
  status?: string(name='Status', description='The invocation status of the API.', example='200'),
  systemParameters?: {
    systemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='The sample value.', example='192.168.1.1'),
      description?: string(name='Description', description='The description.', example='system parameters description'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, and CaProxy.', example='CaClientIp'),
      serviceParameterName?: string(name='ServiceParameterName', description='The mapped parameter name in the backend service.', example='clientIp'),
    }
  ](name='SystemParameter')
  }(name='SystemParameters', description='The common parameters of the APIs, in JSON format.'),
  visibility?: string(name='Visibility', description='Specifies whether to make the API public. Valid values:

*   **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.
*   **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.', example='PUBLIC'),
  webSocketApiType?: string(name='WebSocketApiType', description='The type of the two-way communication API. Valid values:

*   **COMMON**: general APIs
*   **REGISTER**: registered APIs
*   **UNREGISTER**: unregistered APIs
*   **NOTIFY**: downstream notification', example='COMMON'),
}

model DescribeApiHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiHistoryResponseBody(name='body'),
}

/**
 * @summary Queries the details of a specified historical version of a specified API definition.
 *
 * @description Queries the details of a specified historical version of a specified API definition.
 * *   This API is intended for API providers.
 * *   API Gateway records the time and definition of an API every time the API is published. You can use the version number obtained from other operations to query definition details at a certain publication.
 *
 * @param request DescribeApiHistoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiHistoryResponse
 */
async function describeApiHistoryWithOptions(request: DescribeApiHistoryRequest, runtime: Util.RuntimeOptions): DescribeApiHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.historyVersion)) {
    query['HistoryVersion'] = request.historyVersion;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiHistory',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the details of a specified historical version of a specified API definition.
 *
 * @description Queries the details of a specified historical version of a specified API definition.
 * *   This API is intended for API providers.
 * *   API Gateway records the time and definition of an API every time the API is published. You can use the version number obtained from other operations to query definition details at a certain publication.
 *
 * @param request DescribeApiHistoryRequest
 * @return DescribeApiHistoryResponse
 */
async function describeApiHistory(request: DescribeApiHistoryRequest): DescribeApiHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiHistoryWithOptions(request, runtime);
}

model DescribeApiIpControlsRequest {
  apiIds?: string(name='ApiIds', description='The IDs of APIs. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='123,234'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='test'),
}

model DescribeApiIpControlsResponseBody = {
  apiIpControls?: {
    apiIpControlItem?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='46fbb52840d146f186e38e8e70fc8c90'),
      apiName?: string(name='ApiName', description='The name of the API.', example='testapi'),
      boundTime?: string(name='BoundTime', description='The time of binding.', example='2016-07-23T08:28:48Z'),
      ipControlId?: string(name='IpControlId', description='The ID of the ACL.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      ipControlName?: string(name='IpControlName', description='The name of the ACL.', example='testControlName'),
    }
  ](name='ApiIpControlItem')
  }(name='ApiIpControls', description='The information about the ACLs. The information is an array of ApiIpControlItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribeApiIpControlsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiIpControlsResponseBody(name='body'),
}

/**
 * @summary Queries the access control lists (ACLs) that are bound to all the APIs in an API group in a specified environment.
 *
 * @description *   This operation is intended for API callers.
 * *   If an optional parameter is not specified, all results are returned on separate pages.
 * ·
 *
 * @param request DescribeApiIpControlsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiIpControlsResponse
 */
async function describeApiIpControlsWithOptions(request: DescribeApiIpControlsRequest, runtime: Util.RuntimeOptions): DescribeApiIpControlsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiIpControls',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the access control lists (ACLs) that are bound to all the APIs in an API group in a specified environment.
 *
 * @description *   This operation is intended for API callers.
 * *   If an optional parameter is not specified, all results are returned on separate pages.
 * ·
 *
 * @param request DescribeApiIpControlsRequest
 * @return DescribeApiIpControlsResponse
 */
async function describeApiIpControls(request: DescribeApiIpControlsRequest): DescribeApiIpControlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiIpControlsWithOptions(request, runtime);
}

model DescribeApiLatencyDataRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  endTime?: string(name='EndTime', description='The end time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T09:28:48Z'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**
*   **PRE**: the pre-release environment
*   **TEST**', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T08:28:48Z'),
}

model DescribeApiLatencyDataResponseBody = {
  callLatencys?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The time of the monitoring metric. The time format follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2016-07-28T08:20:00Z'),
      itemValue?: string(name='ItemValue', description='The value corresponding to the monitoring metric.', example='15'),
    }
  ](name='MonitorItem')
  }(name='CallLatencys', description='The returned information about API call latency. It is an array consisting of MonitorItem data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ001'),
}

model DescribeApiLatencyDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiLatencyDataResponseBody(name='body'),
}

/**
 * @summary Queries the response time statistics of an API.
 *
 * @description You can call this operation to query the latency metrics in milliseconds for a specified API.
 * *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiLatencyDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiLatencyDataResponse
 */
async function describeApiLatencyDataWithOptions(request: DescribeApiLatencyDataRequest, runtime: Util.RuntimeOptions): DescribeApiLatencyDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiLatencyData',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the response time statistics of an API.
 *
 * @description You can call this operation to query the latency metrics in milliseconds for a specified API.
 * *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiLatencyDataRequest
 * @return DescribeApiLatencyDataResponse
 */
async function describeApiLatencyData(request: DescribeApiLatencyDataRequest): DescribeApiLatencyDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiLatencyDataWithOptions(request, runtime);
}

model DescribeApiMarketAttributesRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='1f9b5e9ba80943099cac52e040b7e160'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='b693252f3f19445e9a01dac177c4454c'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApiMarketAttributesResponseBody = {
  apiId?: string(name='ApiId', description='The ID of the API.', example='6318cd8f6a304cac9318dea8d9a78f7a'),
  marketChargingMode?: string(name='MarketChargingMode', description='The billing method used by the Alibaba Cloud Marketplace.', example='PREPAID_BY_USAGE'),
  needCharging?: string(name='NeedCharging', description='Indicates whether fees are charged.', example='true'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='545D4E52-4F77-5EC4-BB7E-7344CEC7B5E6'),
}

model DescribeApiMarketAttributesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiMarketAttributesResponseBody(name='body'),
}

/**
 * @summary Queries the Alibaba Cloud Marketplace attributes of an API.
 *
 * @param request DescribeApiMarketAttributesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiMarketAttributesResponse
 */
async function describeApiMarketAttributesWithOptions(request: DescribeApiMarketAttributesRequest, runtime: Util.RuntimeOptions): DescribeApiMarketAttributesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiMarketAttributes',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Alibaba Cloud Marketplace attributes of an API.
 *
 * @param request DescribeApiMarketAttributesRequest
 * @return DescribeApiMarketAttributesResponse
 */
async function describeApiMarketAttributes(request: DescribeApiMarketAttributesRequest): DescribeApiMarketAttributesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiMarketAttributesWithOptions(request, runtime);
}

model DescribeApiProductApisRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApiProductApisResponseBody = {
  apiInfoList?: {
    apiInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='dd46297680014a7e8e318308f3345951'),
      apiName?: string(name='ApiName', description='The API name.', example='testApi'),
      description?: string(name='Description', description='The API description.', example='test'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='1e377f18142345dfb700cd8911c2463a'),
      groupName?: string(name='GroupName', description='The name of the API group to which the API belongs.', example='testApiGroup'),
      method?: string(name='Method', description='The request method of the API.', example='POST'),
      path?: string(name='Path', description='The request path of the API.', example='/test'),
      regionId?: string(name='RegionId', description='The ID of the region where the API is deployed.', example='cn-hangzhou'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment', example='RELEASE'),
    }
  ](name='ApiInfo')
  }(name='ApiInfoList', description='The information about the returned APIs.'),
  pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='03442A3D-3B7D-434C-8A95-A5FEB989B519'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='4'),
}

model DescribeApiProductApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiProductApisResponseBody(name='body'),
}

/**
 * @summary Queries the attached APIs of an API product.
 *
 * @param request DescribeApiProductApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiProductApisResponse
 */
async function describeApiProductApisWithOptions(request: DescribeApiProductApisRequest, runtime: Util.RuntimeOptions): DescribeApiProductApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiProductApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the attached APIs of an API product.
 *
 * @param request DescribeApiProductApisRequest
 * @return DescribeApiProductApisResponse
 */
async function describeApiProductApis(request: DescribeApiProductApisRequest): DescribeApiProductApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiProductApisWithOptions(request, runtime);
}

model DescribeApiProductsByAppRequest {
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='110962435'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApiProductsByAppResponseBody = {
  apiProductInfoList?: {
    apiProductInfo?: [ 
    {
      apiProductId?: string(name='ApiProductId', description='The ID of the API product.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
    }
  ](name='ApiProductInfo')
  }(name='ApiProductInfoList', description='The information about API products.'),
  pageNumber?: int32(name='PageNumber', description='The page number. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='0B805201-AF4C-5788-AC9E-C3EEC83DC82A'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='4'),
}

model DescribeApiProductsByAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiProductsByAppResponseBody(name='body'),
}

/**
 * @summary Queries API products by application.
 *
 * @param request DescribeApiProductsByAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiProductsByAppResponse
 */
async function describeApiProductsByAppWithOptions(request: DescribeApiProductsByAppRequest, runtime: Util.RuntimeOptions): DescribeApiProductsByAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiProductsByApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries API products by application.
 *
 * @param request DescribeApiProductsByAppRequest
 * @return DescribeApiProductsByAppResponse
 */
async function describeApiProductsByApp(request: DescribeApiProductsByAppRequest): DescribeApiProductsByAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiProductsByAppWithOptions(request, runtime);
}

model DescribeApiQpsDataRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  endTime?: string(name='EndTime', description='The end time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T09:28:48Z'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**
*   **PRE**: the pre-release environment
*   **TEST**', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T08:28:48Z'),
}

model DescribeApiQpsDataResponseBody = {
  callFails?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The time of the monitoring metric. The time format follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2016-07-28T08:20:00Z'),
      itemValue?: string(name='ItemValue', description='The value corresponding to the monitoring metric.', example='0'),
    }
  ](name='MonitorItem')
  }(name='CallFails', description='The returned information about failed API calls. It is an array consisting of MonitorItem data.'),
  callSuccesses?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The time of the monitoring metric. The time format follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2016-07-28T08:24:00Z'),
      itemValue?: string(name='ItemValue', description='The value corresponding to the monitoring metric.', example='650'),
    }
  ](name='MonitorItem')
  }(name='CallSuccesses', description='The returned information about successful API calls. It is an array consisting of MonitorItem data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ001'),
}

model DescribeApiQpsDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiQpsDataResponseBody(name='body'),
}

/**
 * @summary Queries the QPS statistics of an API.
 *
 * @description *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiQpsDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiQpsDataResponse
 */
async function describeApiQpsDataWithOptions(request: DescribeApiQpsDataRequest, runtime: Util.RuntimeOptions): DescribeApiQpsDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiQpsData',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the QPS statistics of an API.
 *
 * @description *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiQpsDataRequest
 * @return DescribeApiQpsDataResponse
 */
async function describeApiQpsData(request: DescribeApiQpsDataRequest): DescribeApiQpsDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiQpsDataWithOptions(request, runtime);
}

model DescribeApiSignaturesRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs that you want to query. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='123'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model DescribeApiSignaturesResponseBody = {
  apiSignatures?: {
    apiSignatureItem?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='46fbb52840d146f186e38e8e70fc8c90'),
      apiName?: string(name='ApiName', description='The name of the API.', example='testapi'),
      boundTime?: string(name='BoundTime', description='The time when the backend signature key was bound.', example='2016-07-23T08:28:48Z'),
      signatureId?: string(name='SignatureId', description='The ID of the backend signature key.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      signatureName?: string(name='SignatureName', description='The name of the backend signature key.', example='backendsignature'),
    }
  ](name='ApiSignatureItem')
  }(name='ApiSignatures', description='The returned signature key information. It is an array consisting of ApiSignatureItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeApiSignaturesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiSignaturesResponseBody(name='body'),
}

/**
 * @summary Queries the backend signature keys that are bound to the APIs of a specified API group in a specified environment.
 *
 * @description *   This API is intended for API providers.
 * *   The ApiIds parameter is optional. If this parameter is not specified, all results in the specified environment of an API group are returned.
 *
 * @param request DescribeApiSignaturesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiSignaturesResponse
 */
async function describeApiSignaturesWithOptions(request: DescribeApiSignaturesRequest, runtime: Util.RuntimeOptions): DescribeApiSignaturesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiSignatures',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the backend signature keys that are bound to the APIs of a specified API group in a specified environment.
 *
 * @description *   This API is intended for API providers.
 * *   The ApiIds parameter is optional. If this parameter is not specified, all results in the specified environment of an API group are returned.
 *
 * @param request DescribeApiSignaturesRequest
 * @return DescribeApiSignaturesResponse
 */
async function describeApiSignatures(request: DescribeApiSignaturesRequest): DescribeApiSignaturesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiSignaturesWithOptions(request, runtime);
}

model DescribeApiTrafficControlsRequest {
  apiIds?: string(name='ApiIds', description='The IDs of APIs that you want to query. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='123,234'),
  groupId?: string(name='GroupId', description='The ID of the API group that you want to query.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='20'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The runtime environment of the API. Valid values:

*   **RELEASE**
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
}

model DescribeApiTrafficControlsResponseBody = {
  apiTrafficControls?: {
    apiTrafficControlItem?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='46fbb52840d146f186e38e8e70fc8c90'),
      apiName?: string(name='ApiName', description='API operation', example='testapi'),
      boundTime?: string(name='BoundTime', description='The binding time of the throttling policy.', example='2016-07-23T08:28:48Z'),
      trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      trafficControlName?: string(name='TrafficControlName', description='The name of the throttling policy.', example='backendsignature'),
    }
  ](name='ApiTrafficControlItem')
  }(name='ApiTrafficControls', description='The returned throttling policy information. It is an array consisting of ApiTrafficControlItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeApiTrafficControlsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiTrafficControlsResponseBody(name='body'),
}

/**
 * @summary Queries the throttling policies bound to all members of an API group in a specified environment.
 *
 * @description *   This API is intended for API providers.
 * *   The ApiIds parameter is optional. If this parameter is not specified, all results in the specified environment of an API group are returned.
 *
 * @param request DescribeApiTrafficControlsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiTrafficControlsResponse
 */
async function describeApiTrafficControlsWithOptions(request: DescribeApiTrafficControlsRequest, runtime: Util.RuntimeOptions): DescribeApiTrafficControlsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiTrafficControls',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the throttling policies bound to all members of an API group in a specified environment.
 *
 * @description *   This API is intended for API providers.
 * *   The ApiIds parameter is optional. If this parameter is not specified, all results in the specified environment of an API group are returned.
 *
 * @param request DescribeApiTrafficControlsRequest
 * @return DescribeApiTrafficControlsResponse
 */
async function describeApiTrafficControls(request: DescribeApiTrafficControlsRequest): DescribeApiTrafficControlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiTrafficControlsWithOptions(request, runtime);
}

model DescribeApiTrafficDataRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  endTime?: string(name='EndTime', description='The end time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T09:28:48Z'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**
*   **TEST**: the test environment
*   PRE: the pre-release environment', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time in UTC. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2016-07-23T08:28:48Z'),
}

model DescribeApiTrafficDataResponseBody = {
  callDownloads?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The time of the monitoring metric. The time format follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2016-07-28T08:20:00Z'),
      itemValue?: string(name='ItemValue', description='The value corresponding to the monitoring metric.', example='0'),
    }
  ](name='MonitorItem')
  }(name='CallDownloads', description='The returned downlink traffic data of API calls. It is an array consisting of MonitorItem data.'),
  callUploads?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The time of the monitoring metric. The time format follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2016-07-28T08:20:00Z'),
      itemValue?: string(name='ItemValue', description='The value corresponding to the monitoring metric.', example='670'),
    }
  ](name='MonitorItem')
  }(name='CallUploads', description='The returned uplink traffic data of API calls. It is an array consisting of MonitorItem data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ001'),
}

model DescribeApiTrafficDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiTrafficDataResponseBody(name='body'),
}

/**
 * @summary Queries the statistics on the traffic of an API.
 *
 * @description *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiTrafficDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiTrafficDataResponse
 */
async function describeApiTrafficDataWithOptions(request: DescribeApiTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeApiTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiTrafficData',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the statistics on the traffic of an API.
 *
 * @description *   This API is intended for API providers.
 * *   Only statistics for API calls made in the release environment are collected by default.
 *
 * @param request DescribeApiTrafficDataRequest
 * @return DescribeApiTrafficDataResponse
 */
async function describeApiTrafficData(request: DescribeApiTrafficDataRequest): DescribeApiTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiTrafficDataWithOptions(request, runtime);
}

model DescribeApisRequest {
  apiId?: string(name='ApiId', description='The API ID.', example='f68c19ee3bd1478fb58aa05ce8ae9b5a'),
  apiMethod?: string(name='ApiMethod', description='The HTTP method of the API request.', example='GET'),
  apiName?: string(name='ApiName', description='The API name. The name is used for fuzzy match.', example='weather'),
  apiPath?: string(name='ApiPath', description='The request path of the API.', example='/illegal/query'),
  catalogId?: string(name='CatalogId', description='The category ID.', example='1553414085247362'),
  enableTagAuth?: boolean(name='EnableTagAuth', description='Specifies whether to enable tag verification.', example='true'),
  groupId?: string(name='GroupId', description='The API group ID.', example='c4a4d2de657548a2bd485d5d4df42b4a'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which you want to perform this operation. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment', example='RELEASE'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='key'),
      value?: string(name='Value', description='The tag value.', example='value'),
    }
  ](name='Tag', description='The tags of objects that match the rule.', example='Key， Value'),
  unDeployed?: boolean(name='UnDeployed', description='Specifies whether to filter unpublished APIs.', example='true'),
  visibility?: string(name='Visibility', description='Specifies whether the API is public. Valid values:

*   **PUBLIC**: The API is public. If you publish the definition of a public API to the production environment, the definition is displayed on the APIs page for all users.
*   **PRIVATE**: The API is private. If you publish an API group that contains a private API in Alibaba Cloud Marketplace, the API is not displayed in Alibaba Cloud Marketplace.', example='PUBLIC'),
}

model DescribeApisResponseBody = {
  apiSummarys?: {
    apiSummary?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='5af418828f0344a3b588c0cc1331a3bc'),
      apiMethod?: string(name='ApiMethod', description='The HTTP method of the API request.', example='GET'),
      apiName?: string(name='ApiName', description='The API name.', example='CreateObject'),
      apiPath?: string(name='ApiPath', description='The request path of the API.', example='/sqb/'),
      createdTime?: string(name='CreatedTime', description='The time when the API was created. The time is displayed in UTC.', example='2016-05-20T18:18:25Z'),
      deployedInfos?: {
        deployedInfo?: [ 
        {
          deployedStatus?: string(name='DeployedStatus', description='The deployment status. Valid values: DEPLOYED and NONDEPLOYED.', example='DEPLOYED'),
          effectiveVersion?: string(name='EffectiveVersion', description='The deployed version.', example='20220103170737313'),
          stageName?: string(name='StageName', description='Stage Name:

*   **RELEASE**: production environment
*   **PRE**: staging environment
*   **TEST**: test environment', example='RELEASE'),
        }
      ](name='DeployedInfo')
      }(name='DeployedInfos', description='The API publishing statuses.'),
      description?: string(name='Description', description='The API description.', example='Creates an object'),
      groupId?: string(name='GroupId', description='The API group ID.', example='1084f9034c744137901057206b39d2b6'),
      groupName?: string(name='GroupName', description='The name of the API group to which the API belongs.', example='myGroup2'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the API was modified. The time is displayed in UTC.', example='2016-07-23T08:28:48Z'),
      regionId?: string(name='RegionId', description='The ID of the region to which the API belongs.', example='cn-qingdao'),
      tagList?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='tagKey'),
          tagValue?: string(name='TagValue', description='The tag value.', example='tagValue'),
        }
      ](name='Tag')
      }(name='TagList', description='The tags that are added to the APIs.'),
      visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values:

*   **PUBLIC**: The API is public.
*   **PRIVATE**: The API is private.', example='PUBLIC'),
    }
  ](name='ApiSummary')
  }(name='ApiSummarys', description='The queried API definitions.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='3'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='15'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ002'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='32'),
}

model DescribeApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisResponseBody(name='body'),
}

/**
 * @summary Queries a list of APIs that are being defined.
 *
 * @description *   This operation is intended for API callers.
 * *   This operation returns a list of all APIs that are being defined. The basic information about these APIs is also returned in the list.
 * *   This operation returns all APIs that are being edited, regardless of their environments. The returned definitions may be different from the definitions in the environments.
 *
 * @param request DescribeApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisResponse
 */
async function describeApisWithOptions(request: DescribeApisRequest, runtime: Util.RuntimeOptions): DescribeApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiMethod)) {
    query['ApiMethod'] = request.apiMethod;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.apiPath)) {
    query['ApiPath'] = request.apiPath;
  }
  if (!Util.isUnset(request.catalogId)) {
    query['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.enableTagAuth)) {
    query['EnableTagAuth'] = request.enableTagAuth;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.unDeployed)) {
    query['UnDeployed'] = request.unDeployed;
  }
  if (!Util.isUnset(request.visibility)) {
    query['Visibility'] = request.visibility;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries a list of APIs that are being defined.
 *
 * @description *   This operation is intended for API callers.
 * *   This operation returns a list of all APIs that are being defined. The basic information about these APIs is also returned in the list.
 * *   This operation returns all APIs that are being edited, regardless of their environments. The returned definitions may be different from the definitions in the environments.
 *
 * @param request DescribeApisRequest
 * @return DescribeApisResponse
 */
async function describeApis(request: DescribeApisRequest): DescribeApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisWithOptions(request, runtime);
}

model DescribeApisByAppRequest {
  apiName?: string(name='ApiName', description='The name of the API. The name is used for fuzzy match.', example='getPersonInfo'),
  apiUid?: string(name='ApiUid', description='The API ID.', example='b19240592b1b4e74961fb8438ed7550c'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='333486644'),
  description?: string(name='Description', description='The description of the API.', example='test'),
  method?: string(name='Method', description='The request HTTP method of the API.', example='POST'),
  pageNumber?: int32(name='PageNumber', description='The number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  path?: string(name='Path', description='The request path of the API.', example='/tt'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApisByAppResponseBody = {
  appApiRelationInfos?: {
    appApiRelationInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='c625795a1e664782a918eaa629e96ab5'),
      apiName?: string(name='ApiName', description='The API name.', example='sd2_h5_player_history_competition'),
      authVaildTime?: string(name='AuthVaildTime', description='The validity period of the authorization.', example='Sun, 02 Jan 2022 16:00:00 GMT'),
      authorizationSource?: string(name='AuthorizationSource', description='The authorization source.', example='SELF'),
      createdTime?: string(name='CreatedTime', description='The time when the authorization was created.', example='Sun, 02 Jan 2022 16:00:00 GMT'),
      description?: string(name='Description', description='The authorization description.', example='b1008kz'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='38bed48d664149e4b9b5ea576319673f'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='wb2022012101605749'),
      method?: string(name='Method', description='The HTTP method of the API.', example='GET'),
      operator?: string(name='Operator', description='The authorizer. Valid values:

*   **PROVIDER**: API owner
*   **CONSUMER**: API caller', example='PROVIDER'),
      path?: string(name='Path', description='The request path of the API.', example='/api/offline/cacheData'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-shanghai'),
      stageAlias?: string(name='StageAlias', description='The environment alias.', example='Online'),
      stageName?: string(name='StageName', description='The environment name.', example='RELEASE'),
    }
  ](name='AppApiRelationInfo')
  }(name='AppApiRelationInfos', description='The API authorizations.'),
  pageNumber?: int32(name='PageNumber', description='The number of pages to return the results on.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeApisByAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisByAppResponseBody(name='body'),
}

/**
 * @summary Queries the APIs with which an application is associated.
 *
 * @param request DescribeApisByAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisByAppResponse
 */
async function describeApisByAppWithOptions(request: DescribeApisByAppRequest, runtime: Util.RuntimeOptions): DescribeApisByAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.apiUid)) {
    query['ApiUid'] = request.apiUid;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.method)) {
    query['Method'] = request.method;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisByApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs with which an application is associated.
 *
 * @param request DescribeApisByAppRequest
 * @return DescribeApisByAppResponse
 */
async function describeApisByApp(request: DescribeApisByAppRequest): DescribeApisByAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisByAppWithOptions(request, runtime);
}

model DescribeApisByBackendRequest {
  backendId?: string(name='BackendId', description='The ID of the backend service.

This parameter is required.', example='4ac69b7a17524781b275ed4c5eb25c54'),
  pageNumber?: int32(name='PageNumber', description='The number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**
*   **PRE**
*   **TEST**

If you do not specify this parameter, APIs in the draft state are returned.', example='PRE'),
}

model DescribeApisByBackendResponseBody = {
  apiInfoList?: {
    apiInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='20bcdc9453524b78a8beb1f6de21edb7'),
      apiName?: string(name='ApiName', description='The name of the API.', example='testApi'),
      description?: string(name='Description', description='The description of the API.', example='test'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='15bcdc9453524b7gs8beb1f6de21edb7'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='testApiGroup'),
      method?: string(name='Method', description='The request method of the API.', example='GET'),
      path?: string(name='Path', description='The request path of the API.', example='/test'),
    }
  ](name='ApiInfo')
  }(name='ApiInfoList', description='The information about the returned API list.'),
  pageNumber?: int32(name='PageNumber', description='The number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
}

model DescribeApisByBackendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisByBackendResponseBody(name='body'),
}

/**
 * @summary Queries APIs in the draft or published state that are created by using a specified backend service.
 *
 * @param request DescribeApisByBackendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisByBackendResponse
 */
async function describeApisByBackendWithOptions(request: DescribeApisByBackendRequest, runtime: Util.RuntimeOptions): DescribeApisByBackendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisByBackend',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries APIs in the draft or published state that are created by using a specified backend service.
 *
 * @param request DescribeApisByBackendRequest
 * @return DescribeApisByBackendResponse
 */
async function describeApisByBackend(request: DescribeApisByBackendRequest): DescribeApisByBackendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisByBackendWithOptions(request, runtime);
}

model DescribeApisByIpControlRequest {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApisByIpControlResponseBody = {
  apiInfos?: {
    apiInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='3b81fd160f5645e097cc8855d75a1cf6'),
      apiName?: string(name='ApiName', description='The name of the API', example='testapi'),
      boundTime?: string(name='BoundTime', description='The time of API binding.', example='2016-07-23T08:28:48Z'),
      description?: string(name='Description', description='The description of the API.', example='Description'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='0009db9c828549768a200320714b8930'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='mygroup'),
      regionId?: string(name='RegionId', description='The region in which the API is located.', example='cn-qingdao'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST.', example='TEST'),
      visibility?: string(name='Visibility', description='The visibility of the API. Valid values:

*   **PUBLIC**
*   **PRIVATE**', example='PUBLIC'),
    }
  ](name='ApiInfo')
  }(name='ApiInfos', description='The returned API information. It is an array of ApiInfo data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeApisByIpControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisByIpControlResponseBody(name='body'),
}

/**
 * @summary Queries the APIs that are bound to an access control list (ACL).
 *
 * @description *   This operation is intended for API callers.
 * *   You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisByIpControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisByIpControlResponse
 */
async function describeApisByIpControlWithOptions(request: DescribeApisByIpControlRequest, runtime: Util.RuntimeOptions): DescribeApisByIpControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisByIpControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs that are bound to an access control list (ACL).
 *
 * @description *   This operation is intended for API callers.
 * *   You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisByIpControlRequest
 * @return DescribeApisByIpControlResponse
 */
async function describeApisByIpControl(request: DescribeApisByIpControlRequest): DescribeApisByIpControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisByIpControlWithOptions(request, runtime);
}

model DescribeApisBySignatureRequest {
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  signatureId?: string(name='SignatureId', description='The ID of the signature key.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
}

model DescribeApisBySignatureResponseBody = {
  apiInfos?: {
    apiInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='3b81fd160f5645e097cc8855d75a1cf6'),
      apiName?: string(name='ApiName', description='The name of the API.', example='testapi'),
      boundTime?: string(name='BoundTime', description='The binding time of the API.', example='2016-07-23T08:28:48Z'),
      description?: string(name='Description', description='The description of the API.', example='Description'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='0009db9c828549768a200320714b8930'),
      groupName?: string(name='GroupName', description='The name of the group to which the API belongs.', example='mygroup'),
      regionId?: string(name='RegionId', description='The region where the API is located.', example='cn-qingdao'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='TEST'),
      visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values:

*   **PUBLIC**
*   **PRIVATE**', example='PUBLIC'),
    }
  ](name='ApiInfo')
  }(name='ApiInfos', description='The returned API information. It is an array consisting of ApiInfo data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeApisBySignatureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisBySignatureResponseBody(name='body'),
}

/**
 * @summary Queries the APIs to which a specified backend signature key is bound.
 *
 * @description *   This API is intended for API providers.
 * *   The results are returned on separate pages. You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisBySignatureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisBySignatureResponse
 */
async function describeApisBySignatureWithOptions(request: DescribeApisBySignatureRequest, runtime: Util.RuntimeOptions): DescribeApisBySignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisBySignature',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs to which a specified backend signature key is bound.
 *
 * @description *   This API is intended for API providers.
 * *   The results are returned on separate pages. You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisBySignatureRequest
 * @return DescribeApisBySignatureResponse
 */
async function describeApisBySignature(request: DescribeApisBySignatureRequest): DescribeApisBySignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisBySignatureWithOptions(request, runtime);
}

model DescribeApisByTrafficControlRequest {
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='9abe3317-3e22-4957-ab9f-dd893d0ac956'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy that you want to query.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
}

model DescribeApisByTrafficControlResponseBody = {
  apiInfos?: {
    apiInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='3b81fd160f5645e097cc8855d75a1cf6'),
      apiName?: string(name='ApiName', description='The name of the API', example='testapi'),
      boundTime?: string(name='BoundTime', description='The binding time of the API.', example='2016-07-23T08:28:48Z'),
      description?: string(name='Description', description='The description of the API.', example='Description'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='0009db9c828549768a200320714b8930'),
      groupName?: string(name='GroupName', description='The name of the group to which an API belongs.', example='mygroup'),
      regionId?: string(name='RegionId', description='The region where the API is located.', example='cn-qingdao'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='TEST'),
      visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values:

*   **PUBLIC**
*   **PRIVATE**', example='PUBLIC'),
    }
  ](name='ApiInfo')
  }(name='ApiInfos', description='The returned API information. It is an array consisting of ApiInfo data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeApisByTrafficControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisByTrafficControlResponseBody(name='body'),
}

/**
 * @summary Queries the APIs to which a specified throttling policy is bound.
 *
 * @description *   This API is intended for API providers.
 * *   You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisByTrafficControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisByTrafficControlResponse
 */
async function describeApisByTrafficControlWithOptions(request: DescribeApisByTrafficControlRequest, runtime: Util.RuntimeOptions): DescribeApisByTrafficControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisByTrafficControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs to which a specified throttling policy is bound.
 *
 * @description *   This API is intended for API providers.
 * *   You can specify PageNumber to obtain the result on the specified page.
 *
 * @param request DescribeApisByTrafficControlRequest
 * @return DescribeApisByTrafficControlResponse
 */
async function describeApisByTrafficControl(request: DescribeApisByTrafficControlRequest): DescribeApisByTrafficControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisByTrafficControlWithOptions(request, runtime);
}

model DescribeApisByVpcAccessRequest {
  pageNumber?: int32(name='PageNumber', description='The page number. Pages start from page 1. Default value: 1.', example='2'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  vpcName?: string(name='VpcName', description='The name of the VPC access authorization.', example='lynkco-iov-uat'),
}

model DescribeApisByVpcAccessResponseBody = {
  apiVpcAccessInfos?: {
    apiVpcAccessInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='09839002de484e76b5a213b040a6a3ca'),
      apiName?: string(name='ApiName', description='The API name.', example='iwc'),
      description?: string(name='Description', description='The description, which can be up to 200 characters in length.', example='123'),
      groupId?: string(name='GroupId', description='The ID of the API group to which the API belongs.', example='41c33748cbfb41f6b00870156203b72a'),
      groupName?: string(name='GroupName', description='The name of the API group to which the API belongs.', example='RT_PLU_IP_CTRL_group'),
      instanceId?: string(name='InstanceId', description='The instance ID or IP address in the VPC access authorization.', example='Ib-04e41XXXXXd95e9c1'),
      method?: string(name='Method', description='The HTTP request method of the API.', example='POST'),
      path?: string(name='Path', description='The request path of the API.', example='/api/v1/friends/rc/status'),
      port?: int32(name='Port', description='The port number.', example='443'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-shanghai'),
      stageId?: string(name='StageId', description='The environment ID.', example='57e17906a69b4424914fb1e05f67c78a'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment', example='RELEASE'),
      vpcId?: string(name='VpcId', description='vpc id', example='vpc-2ze7bj64wstznvftrskbk'),
      vpcName?: string(name='VpcName', description='The name of the VPC access authorization.', example='aliYun_service_prod'),
    }
  ](name='ApiVpcAccessInfo')
  }(name='ApiVpcAccessInfos', description='The returned API information. It is an array consisting of ApiInfo data.'),
  pageNumber?: int32(name='PageNumber', description='The page number. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100. Default value: 10.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='4E707B25-5119-5ACF-9D26-7D2A2762F05C'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'),
}

model DescribeApisByVpcAccessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisByVpcAccessResponseBody(name='body'),
}

/**
 * @summary Queries the APIs that are associated with a virtual private cloud (VPC) access authorization in a region.
 *
 * @param request DescribeApisByVpcAccessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisByVpcAccessResponse
 */
async function describeApisByVpcAccessWithOptions(request: DescribeApisByVpcAccessRequest, runtime: Util.RuntimeOptions): DescribeApisByVpcAccessResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcName)) {
    query['VpcName'] = request.vpcName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisByVpcAccess',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs that are associated with a virtual private cloud (VPC) access authorization in a region.
 *
 * @param request DescribeApisByVpcAccessRequest
 * @return DescribeApisByVpcAccessResponse
 */
async function describeApisByVpcAccess(request: DescribeApisByVpcAccessRequest): DescribeApisByVpcAccessResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisByVpcAccessWithOptions(request, runtime);
}

model DescribeApisWithStageNameIntegratedByAppRequest {
  apiName?: string(name='ApiName', description='The API name.', example='ApiName'),
  apiUid?: string(name='ApiUid', description='The API ID.', example='b19240592b1b4e74961fb8438ed7550c'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='2386789'),
  description?: string(name='Description', description='The API description. The description can be up to 200 characters in length.', example='test'),
  method?: string(name='Method', description='The request HTTP method of the API.', example='POST'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  path?: string(name='Path', description='The request path of the API.', example='/tt'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeApisWithStageNameIntegratedByAppResponseBody = {
  appApiRelationInfos?: {
    appApiRelationInfo?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='c625795a1e664782a918eaa629e96ab5'),
      apiName?: string(name='ApiName', description='The API name.', example='sd2_h5_player_history_competition'),
      authorizationSource?: string(name='AuthorizationSource', description='The authorization source.', example='SELF'),
      createdTime?: string(name='CreatedTime', description='The time when the authorization was created.', example='Sun, 02 Jan 2022 16:00:00 GMT'),
      description?: string(name='Description', description='The API description.', example='b1008kz'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='38bed48d664149e4b9b5ea576319673f'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='manager_vehicles'),
      method?: string(name='Method', description='The request HTTP method of the API.', example='POST'),
      operator?: string(name='Operator', description='The authorizer. Valid values:

*   **PROVIDER:** the API owner
*   **CONSUMER:** the API caller', example='PROVIDER'),
      path?: string(name='Path', description='The request path of the API.', example='/api/offline/cacheData'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-shanghai'),
      stageNameAndAuth?: map[string]string(name='StageNameAndAuth', description='The mapping information between environments and authorizations.'),
    }
  ](name='AppApiRelationInfo')
  }(name='AppApiRelationInfos', description='The authorization information of the API.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'),
}

model DescribeApisWithStageNameIntegratedByAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisWithStageNameIntegratedByAppResponseBody(name='body'),
}

/**
 * @summary Queries APIs by application. The environment information is also returned.
 *
 * @param request DescribeApisWithStageNameIntegratedByAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisWithStageNameIntegratedByAppResponse
 */
async function describeApisWithStageNameIntegratedByAppWithOptions(request: DescribeApisWithStageNameIntegratedByAppRequest, runtime: Util.RuntimeOptions): DescribeApisWithStageNameIntegratedByAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.apiUid)) {
    query['ApiUid'] = request.apiUid;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.method)) {
    query['Method'] = request.method;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApisWithStageNameIntegratedByApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries APIs by application. The environment information is also returned.
 *
 * @param request DescribeApisWithStageNameIntegratedByAppRequest
 * @return DescribeApisWithStageNameIntegratedByAppResponse
 */
async function describeApisWithStageNameIntegratedByApp(request: DescribeApisWithStageNameIntegratedByAppRequest): DescribeApisWithStageNameIntegratedByAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisWithStageNameIntegratedByAppWithOptions(request, runtime);
}

model DescribeAppRequest {
  appId?: long(name='AppId', description='The ID of the app. The ID is generated by the system and globally unique.', example='110843374'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAppResponseBody = {
  appId?: long(name='AppId', description='The ID of the app.', example='110843374'),
  appName?: string(name='AppName', description='The name of the app.', example='CreateApptest'),
  createdTime?: string(name='CreatedTime', description='The time when the app was created.', example='2019-01-29T09:33:01Z'),
  description?: string(name='Description', description='The description of the app.', example='Estimated on October 15, 2021 at 10:20:27'),
  extend?: string(name='Extend', description='扩展信息', example='110243810311'),
  modifiedTime?: string(name='ModifiedTime', description='The time when the app was modified.', example='2019-01-29T09:33:01Z'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DBDB3B0F-EC61-5F33-88AD-EC2446FA1DDB'),
}

model DescribeAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppResponseBody(name='body'),
}

/**
 * @summary Queries the apps that can be authorized.
 *
 * @param request DescribeAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppResponse
 */
async function describeAppWithOptions(request: DescribeAppRequest, runtime: Util.RuntimeOptions): DescribeAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the apps that can be authorized.
 *
 * @param request DescribeAppRequest
 * @return DescribeAppResponse
 */
async function describeApp(request: DescribeAppRequest): DescribeAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppWithOptions(request, runtime);
}

model DescribeAppAttributesRequest {
  appCode?: string(name='AppCode', description='The AppCode of the app.', example='23552160'),
  appId?: long(name='AppId', description='The ID of the app.', example='20112314518278'),
  appKey?: string(name='AppKey', description='The app key that is used to make an API call.', example='203708622'),
  appName?: string(name='AppName', description='The name of the app.', example='testApp'),
  enableTagAuth?: boolean(name='EnableTagAuth', description='Specifies whether to enable tag verification.', example='true'),
  extend?: string(name='Extend', description='扩展信息', example='110243810311'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  sort?: string(name='Sort', description='The order. Valid values: asc and desc. Default value: desc.

*   asc: The apps are displayed in ascending order of modification time.
*   desc: The apps are displayed in descending order of modification time.', example='desc'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='env'),
      value?: string(name='Value', description='The key of the tag.

N can be an integer from 1 to 20.``', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model DescribeAppAttributesResponseBody = {
  apps?: {
    appAttribute?: [ 
    {
      appId?: long(name='AppId', description='The ID of the app.', example='20112314518278'),
      appName?: string(name='AppName', description='The name of the app.', example='CreateApptest'),
      createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the app.', example='2016-07-31T04:10:19Z'),
      description?: string(name='Description', description='The description of the app.', example='App test'),
      extend?: string(name='Extend', description='扩展信息', example='110461946884'),
      modifiedTime?: string(name='ModifiedTime', description='The modification time (UTC) of the app.', example='2016-07-31T04:10:19Z'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The key of the tag.', example='appid'),
          value?: string(name='Value', description='The value of the tag.', example='123'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The tags.'),
    }
  ](name='AppAttribute')
  }(name='Apps', description='The returned app information. It is an array that consists of AppAttribute data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='8883AC74-259D-4C0B-99FC-0B7F9A588B2F'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribeAppAttributesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppAttributesResponseBody(name='body'),
}

/**
 * @summary Queries apps and their basic information.
 *
 * @description *   This operation is intended for API callers.
 * *   AppId is optional.
 *
 * @param request DescribeAppAttributesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppAttributesResponse
 */
async function describeAppAttributesWithOptions(request: DescribeAppAttributesRequest, runtime: Util.RuntimeOptions): DescribeAppAttributesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.enableTagAuth)) {
    query['EnableTagAuth'] = request.enableTagAuth;
  }
  if (!Util.isUnset(request.extend)) {
    query['Extend'] = request.extend;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.sort)) {
    query['Sort'] = request.sort;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppAttributes',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries apps and their basic information.
 *
 * @description *   This operation is intended for API callers.
 * *   AppId is optional.
 *
 * @param request DescribeAppAttributesRequest
 * @return DescribeAppAttributesResponse
 */
async function describeAppAttributes(request: DescribeAppAttributesRequest): DescribeAppAttributesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppAttributesWithOptions(request, runtime);
}

model DescribeAppSecuritiesRequest {
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='110862931'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAppSecuritiesResponseBody = {
  appSecuritys?: {
    appSecurity?: [ 
    {
      appCode?: string(name='AppCode', description='The application AppCode.', example='d2350ecd62c44cbfbe35a7f182e35105'),
      appKey?: string(name='AppKey', description='The application AppKey.', example='34379343'),
      appSecret?: string(name='AppSecret', description='The application AppSecret.', example='ea5291a7aff343769eb3139a2f6de8c9'),
      createdTime?: string(name='CreatedTime', description='The time when the AppKey was created.', example='2021-09-14T18:50:59'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the AppSecret was last modified. The time is displayed in UTC.', example='2023-08-14T18:03:00+08:00'),
    }
  ](name='AppSecurity')
  }(name='AppSecuritys', description='The associated security policy information.'),
  requestId?: string(name='RequestId', description='The request ID.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model DescribeAppSecuritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppSecuritiesResponseBody(name='body'),
}

/**
 * @summary Queries the key-related information of an application.
 *
 * @param request DescribeAppSecuritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppSecuritiesResponse
 */
async function describeAppSecuritiesWithOptions(request: DescribeAppSecuritiesRequest, runtime: Util.RuntimeOptions): DescribeAppSecuritiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppSecurities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the key-related information of an application.
 *
 * @param request DescribeAppSecuritiesRequest
 * @return DescribeAppSecuritiesResponse
 */
async function describeAppSecurities(request: DescribeAppSecuritiesRequest): DescribeAppSecuritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppSecuritiesWithOptions(request, runtime);
}

model DescribeAppSecurityRequest {
  appId?: long(name='AppId', description='The ID of the app.

This parameter is required.', example='20112314518278'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

This parameter is required.', example='app'),
      value?: string(name='Value', description='The value of the tag.', example='123'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model DescribeAppSecurityResponseBody = {
  appCode?: string(name='AppCode', description='The AppCode of the app.', example='3aaf905a0a1f4f0eabc6d891dfa08afc'),
  appKey?: string(name='AppKey', description='The key of the app.', example='60030986'),
  appSecret?: string(name='AppSecret', description='The password of the app.', example='c1ae97aaa7e45f21d10824bc44678fee'),
  createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the key, which is the same as the app creation time.', example='2016-07-31T04:10:19Z'),
  modifiedTime?: string(name='ModifiedTime', description='The modification time (UTC) of the key.', example='2016-07-31T04:10:19Z'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DescribeAppSecurityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppSecurityResponseBody(name='body'),
}

/**
 * @summary This key is used for authentication when an API call is made.
 *
 * @description *   This operation is intended for API callers.
 *
 * @param request DescribeAppSecurityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppSecurityResponse
 */
async function describeAppSecurityWithOptions(request: DescribeAppSecurityRequest, runtime: Util.RuntimeOptions): DescribeAppSecurityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppSecurity',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This key is used for authentication when an API call is made.
 *
 * @description *   This operation is intended for API callers.
 *
 * @param request DescribeAppSecurityRequest
 * @return DescribeAppSecurityResponse
 */
async function describeAppSecurity(request: DescribeAppSecurityRequest): DescribeAppSecurityResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppSecurityWithOptions(request, runtime);
}

model DescribeAppsRequest {
  appId?: long(name='AppId', description='The ID of the app.', example='20112314518278'),
  appOwner?: long(name='AppOwner', description='The Alibaba Cloud account of the app owner. For more information, see [Account Management](https://account.console.aliyun.com/?spm=a2c4g.11186623.2.15.3a8c196eVWxvQB#/secure).', example='1546564'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAppsResponseBody = {
  apps?: {
    appItem?: [ 
    {
      appId?: long(name='AppId', description='The ID of the app.', example='20112314518278'),
      appName?: string(name='AppName', description='The name of the app.', example='CreateApptest'),
      description?: string(name='Description', description='The description of the app.', example='App test'),
    }
  ](name='AppItem')
  }(name='Apps', description='The returned app information. It is an array consisting of AppItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribeAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppsResponseBody(name='body'),
}

/**
 * @summary Queries the apps of a user. App information is returned only to the app owner.
 *
 * @description *   This API is intended for API providers.
 * *   API providers can use the app IDs or their Alibaba Cloud accounts to query app information.
 * *   Each provider can call this operation for a maximum of 200 times every day in a region.
 *
 * @param request DescribeAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppsResponse
 */
async function describeAppsWithOptions(request: DescribeAppsRequest, runtime: Util.RuntimeOptions): DescribeAppsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appOwner)) {
    query['AppOwner'] = request.appOwner;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApps',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the apps of a user. App information is returned only to the app owner.
 *
 * @description *   This API is intended for API providers.
 * *   API providers can use the app IDs or their Alibaba Cloud accounts to query app information.
 * *   Each provider can call this operation for a maximum of 200 times every day in a region.
 *
 * @param request DescribeAppsRequest
 * @return DescribeAppsResponse
 */
async function describeApps(request: DescribeAppsRequest): DescribeAppsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppsWithOptions(request, runtime);
}

model DescribeAppsByApiProductRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  appName?: string(name='AppName', description='The application name.', example='testApp'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAppsByApiProductResponseBody = {
  authorizedApps?: {
    authorizedApp?: [ 
    {
      appId?: long(name='AppId', description='The application ID.', example='110982419'),
      appName?: string(name='AppName', description='The application name.', example='APP_02580_DEV'),
      authValidTime?: string(name='AuthValidTime', description='The expiration time of the authorization. The time is in GMT. An empty value indicates that the authorization does not expire.', example='2023-06-17T03:41:53Z'),
      authorizedTime?: string(name='AuthorizedTime', description='The time when the authorization was created. The time is in GMT.', example='2016-07-21T06:17:20Z'),
      description?: string(name='Description', description='The authorization description.', example='Test share with nsc qiming'),
      extend?: string(name='Extend', description='The extended information.', example='extra info'),
    }
  ](name='AuthorizedApp')
  }(name='AuthorizedApps', description='The information about authorized applications.'),
  pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='AC866798-62D3-52F4-8AB5-CA149A53984F'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='4'),
}

model DescribeAppsByApiProductResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppsByApiProductResponseBody(name='body'),
}

/**
 * @summary Queries authorized applications by API product.
 *
 * @param request DescribeAppsByApiProductRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppsByApiProductResponse
 */
async function describeAppsByApiProductWithOptions(request: DescribeAppsByApiProductRequest, runtime: Util.RuntimeOptions): DescribeAppsByApiProductResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppsByApiProduct',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries authorized applications by API product.
 *
 * @param request DescribeAppsByApiProductRequest
 * @return DescribeAppsByApiProductResponse
 */
async function describeAppsByApiProduct(request: DescribeAppsByApiProductRequest): DescribeAppsByApiProductResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppsByApiProductWithOptions(request, runtime);
}

model DescribeAuthorizedApisRequest {
  appId?: long(name='AppId', description='The application ID, which is generated by the system and globally unique.

This parameter is required.', example='2386789'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeAuthorizedApisResponseBody = {
  authorizedApis?: {
    authorizedApi?: [ 
    {
      apiId?: string(name='ApiId', description='The unique identifier of the API, which is automatically generated by the system.', example='baacc592e63a4cb6a41920d9d3f91f38'),
      apiName?: string(name='ApiName', description='The name of the API', example='AreaWeather'),
      authVaildTime?: string(name='AuthVaildTime', description='The expiration time of the authorization in UTC.', example='2018-10-05T16:00:00Z'),
      authorizationSource?: string(name='AuthorizationSource', description='The authorization source. Valid values:

*   **CONSOLE**
*   **API**', example='CONSOLE'),
      authorizedTime?: string(name='AuthorizedTime', description='The authorization time in UTC.', example='2016-07-21T06:17:20'),
      description?: string(name='Description', description='Authorization description', example='Queries weather based on the region name'),
      groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='Weather'),
      operator?: string(name='Operator', description='The authorizer. Valid values:

*   **PROVIDER:** API owner
*   **CONSUMER:** API caller', example='PROVIDER'),
      regionId?: string(name='RegionId', description='The region to which the API belongs.', example='cn-hangzhou'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**: the test environment', example='RELEASE'),
    }
  ](name='AuthorizedApi')
  }(name='AuthorizedApis', description='The authorized API set.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeAuthorizedApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthorizedApisResponseBody(name='body'),
}

/**
 * @summary Queries the authorized APIs of a specified APP.
 *
 * @description *   This operation is intended for API callers.
 * *   The specified application can call all APIs included in the responses.
 *
 * @param request DescribeAuthorizedApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthorizedApisResponse
 */
async function describeAuthorizedApisWithOptions(request: DescribeAuthorizedApisRequest, runtime: Util.RuntimeOptions): DescribeAuthorizedApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthorizedApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the authorized APIs of a specified APP.
 *
 * @description *   This operation is intended for API callers.
 * *   The specified application can call all APIs included in the responses.
 *
 * @param request DescribeAuthorizedApisRequest
 * @return DescribeAuthorizedApisResponse
 */
async function describeAuthorizedApis(request: DescribeAuthorizedApisRequest): DescribeAuthorizedApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthorizedApisWithOptions(request, runtime);
}

model DescribeAuthorizedAppsRequest {
  apiId?: string(name='ApiId', description='The ID of the API. This ID is generated by the system and globally unique.

This parameter is required.', example='baacc592e63a4cb6a41920d9d3f91f38'),
  appId?: long(name='AppId', description='The ID of the app.', example='20112314518278'),
  appName?: string(name='AppName', description='The name of the app.', example='CreateApptest'),
  appOwnerId?: long(name='AppOwnerId', description='The Alibaba Cloud account of the app owner.', example='1546564'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment', example='RELEASE'),
}

model DescribeAuthorizedAppsResponseBody = {
  authorizedApps?: {
    authorizedApp?: [ 
    {
      appDescription?: string(name='AppDescription', description='The application description.', example='Production application'),
      appId?: long(name='AppId', description='The application ID, which is generated by the system and globally unique.', example='2386789'),
      appName?: string(name='AppName', description='The application name.', example='Weather'),
      authVaildTime?: string(name='AuthVaildTime', description='The application name.', example='2018-10-05T16:00:00Z'),
      authorizationSource?: string(name='AuthorizationSource', description='The authorization source. Valid values:

*   **CONSOLE**
*   **API**', example='CONSOLE'),
      authorizedTime?: string(name='AuthorizedTime', description='The authorization time (UTC).', example='2016-07-21T06:17:20Z'),
      description?: string(name='Description', description='The authorization description.', example='Queries weather based on the region name'),
      operator?: string(name='Operator', description='The authorizer. Valid values:

*   **PROVIDER**: API owner
*   **CONSUMER**: API caller', example='PROVIDER'),
      stageAlias?: string(name='StageAlias', description='The environment alias.', example='Production'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment', example='RELEASE'),
      tag?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The tag key.', example='DEV'),
          value?: string(name='Value', description='The tag value.', example='240'),
        }
      ](name='TagInfo')
      }(name='Tag', description='The key of the tag.'),
    }
  ](name='AuthorizedApp')
  }(name='AuthorizedApps', description='The authorized applications.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeAuthorizedAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthorizedAppsResponseBody(name='body'),
}

/**
 * @summary Queries the current apps.
 *
 * @description *   This operation is intended for API providers.
 * *   All applications included in the responses have access to the specified API.
 *
 * @param request DescribeAuthorizedAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthorizedAppsResponse
 */
async function describeAuthorizedAppsWithOptions(request: DescribeAuthorizedAppsRequest, runtime: Util.RuntimeOptions): DescribeAuthorizedAppsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appOwnerId)) {
    query['AppOwnerId'] = request.appOwnerId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthorizedApps',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the current apps.
 *
 * @description *   This operation is intended for API providers.
 * *   All applications included in the responses have access to the specified API.
 *
 * @param request DescribeAuthorizedAppsRequest
 * @return DescribeAuthorizedAppsResponse
 */
async function describeAuthorizedApps(request: DescribeAuthorizedAppsRequest): DescribeAuthorizedAppsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthorizedAppsWithOptions(request, runtime);
}

model DescribeBackendInfoRequest {
  backendId?: string(name='BackendId', description='The ID of the backend service.', example='739b68751c0b4e899e04d0c92b6d0be7'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeBackendInfoResponseBody = {
  backendInfo?: {
    backendId?: string(name='BackendId', description='The ID of the backend service.', example='6fc978bb63574146b766863dd7bdf661'),
    backendModels?: [ 
      {
        backendConfig?: {
          discoveryConfig?: {
            nacosConfig?: {
              accessKey?: string(name='AccessKey', description='The AccessKey of the RAM user that has the resource management permissions on Microservices Engine (MSE).', example='A5FIDxxxxxx'),
              authType?: string(name='AuthType', description='The authentication method.', example='PASSWORD'),
              clusters?: string(name='Clusters', description='The name of the cluster to which the microservice belongs.', example='cluster1'),
              groupName?: string(name='GroupName', description='The name of the group to which the microservice that is registered with Nacos belongs.', example='DEFAULT_GROUP'),
              namespace?: string(name='Namespace', description='The ID of the namespace where the microservice that is registered with Nacos resides.', example='public'),
              password?: string(name='Password', description='The password.', example='password'),
              secretKey?: string(name='SecretKey', description='The SecretKey of the RAM user that has the resource management permissions on MSE.', example='dl5loxxxxxx'),
              serverAddress?: string(name='ServerAddress', description='The Nacos service address.', example='http://1xx.2xx.3xx.4xx:8848'),
              serviceName?: string(name='ServiceName', description='The microservice name.', example='service-provider'),
              userName?: string(name='UserName', description='The username.', example='username'),
            }(name='NacosConfig', description='The Nacos configurations.'),
            rcType?: string(name='RcType', description='The registry type.', example='NACOS'),
            zookeeperConfig?: {
              connectString?: string(name='ConnectString', description='The connection URL of the ZooKeeper server.', example='http://192.168.1.xxx:2181'),
              namespace?: string(name='Namespace', description='The namespace.', example='provider'),
              serviceName?: string(name='ServiceName', description='Service name', example='service'),
            }(name='ZookeeperConfig', description='The ZooKeeper configuration.'),
          }(name='DiscoveryConfig', description='The information about the backend service when the backend service is of the Service Discovery type.'),
          edasConfig?: {
            edasAppId?: string(name='EdasAppId', description='The EDAS application ID.', example='6cd0c599-dxxx-496d-b3d5-6a71c657xxxxx'),
            microserviceNamespace?: string(name='MicroserviceNamespace', description='The ID of the microservices namespace in EDAS.', example='cn-hangzhou:edasNacos'),
            microserviceNamespaceId?: string(name='MicroserviceNamespaceId', description='The ID of the microservices namespace in EDAS.', example='cn-hangzhou:edasNacos'),
            microserviceNamespaceName?: string(name='MicroserviceNamespaceName', description='The name of the microservices namespace in EDAS.', example='Edas-Nacos'),
            mseInstanceId?: string(name='MseInstanceId', description='The MSE instance ID.', example='mse-cn-jia3n1rxxxx'),
            registryType?: string(name='RegistryType', description='The registration type.', example='EDAS'),
            serviceName?: string(name='ServiceName', description='The service name.', example='service'),
          }(name='EdasConfig', description='The EDAS configuration.'),
          eventBridgeConfig?: {
            eventBridgeRegionId?: string(name='EventBridgeRegionId', description='The region ID of the event bus in EventBridge.', example='cn-hangzhou'),
            eventBus?: string(name='EventBus', description='The event bus.', example='testBus'),
            eventSource?: string(name='EventSource', description='The event source.', example='dds_driver'),
            roleArn?: string(name='RoleArn', description='The ARN of the RAM role to be assumed by API Gateway to access EventBridge.', example='acs:ram::1975133748561***:role/aliyunserviceroleforiotlogexport'),
          }(name='EventBridgeConfig', description='The information about the backend service whose type is EventBridge.'),
          functionComputeConfig?: {
            fcBaseUrl?: string(name='FcBaseUrl', description='The root path of the Function Compute service.', example='https://t*******.ap-*****.fcapp.run/'),
            fcRegionId?: string(name='FcRegionId', description='The region ID of the Function Compute service.', example='cn-hangzhou'),
            fcType?: string(name='FcType', description='The type of the service in Function Compute.', example='HttpTrigger'),
            functionName?: string(name='FunctionName', description='The function name that is defined in Function Compute.', example='edge_function'),
            onlyBusinessPath?: boolean(name='OnlyBusinessPath', description='Indicates whether the backend service receives only the service path.', example='false'),
            qualifier?: string(name='Qualifier', description='The alias of the function.', example='testQualifier'),
            roleArn?: string(name='RoleArn', description='The Alibaba Cloud Resource Name (ARN) of the RAM role that is assumed by API Gateway to access Function Compute.', example='acs:ram::31985*:role/aliyunserviceroleforbastionhostpam'),
            serviceName?: string(name='ServiceName', description='The service name that is defined in Function Compute.', example='myservice'),
            triggerName?: string(name='TriggerName', description='The name of the trigger.

You can specify the TriggerName or TriggerUrl parameter. The TriggerName parameter is optional.', example='test1'),
          }(name='FunctionComputeConfig', description='The information about the backend service whose type is Function Compute.'),
          httpTargetHostName?: string(name='HttpTargetHostName', description='The host of the HTTP backend service.', example='www.host.com'),
          mockConfig?: {
            mockHeaders?: [ 
              {
                headerName?: string(name='HeaderName', description='The header name.', example='test'),
                headerValue?: string(name='HeaderValue', description='The header value.', example='123'),
              }
            ](name='MockHeaders', description='The header in the mocked response.'),
            mockResult?: string(name='MockResult', description='The mocked response.', example='test'),
            mockStatusCode?: string(name='MockStatusCode', description='The status code in the mocked response.', example='200'),
          }(name='MockConfig', description='The information about the backend service when the backend service is of the Mock type.'),
          ossConfig?: {
            bucketName?: string(name='BucketName', description='The name of the OSS bucket.', example='my_bucket'),
            ossRegionId?: string(name='OssRegionId', description='The region ID of the OSS bucket.', example='cn-hangzhou'),
          }(name='OssConfig', description='The information about the backend service whose type is Object Storage Service (OSS).'),
          serviceAddress?: string(name='ServiceAddress', description='The URL of the backend service.', example='10.0.0.1'),
          serviceTimeout?: int32(name='ServiceTimeout', description='The timeout period of the backend service, in millisecond.', example='10000'),
          type?: string(name='Type', description='The type of the backend service.', example='VPC'),
          vpcConfig?: {
            instanceId?: string(name='InstanceId', description='The ID of the Elastic Compute Service (ECS) or Server Load Balancer (SLB) instance in the VPC.', example='i-uf6iaale3gfef9t9cb41'),
            name?: string(name='Name', description='The name of the VPC configuration.', example='dypls-cn-beijing-slb-pre'),
            port?: long(name='Port', description='The port number that corresponds to the instance.', example='8080'),
            vpcAccessId?: string(name='VpcAccessId', description='The ID of the VPC access authorization.', example='2zej3ehuzg9m77kvwnfpn'),
            vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-wz9v96hqi6d14744sxqmx'),
            vpcScheme?: string(name='VpcScheme', description='Indicates whether HTTP or HTTPS is used.', example='http'),
            vpcTargetHostName?: string(name='VpcTargetHostName', description='The host of the VPC backend service.', example='openapi.alipan.com'),
          }(name='VpcConfig', description='The information about the backend service when the backend service is of the VPC type.'),
        }(name='BackendConfig', description='The backend service configurations.'),
        backendModelId?: string(name='BackendModelId', description='The ID of the backend service in the environment.', example='5c4995d08e8b4954b0f326e8e4f2b97d'),
        description?: string(name='Description', description='The description of the backend service.', example='testDvs 1'),
        gmtCreate?: string(name='GmtCreate', description='The time when the backend service was created.', example='2021-12-20T03:22:03.000+0000'),
        gmtModified?: string(name='GmtModified', description='The time when the backend service was modified.', example='2021-12-20T03:22:03.000+0000'),
        stageModeId?: string(name='StageModeId', description='The ID of the environment.', example='6fc978bb63574146b766863dd7bdf661'),
        stageName?: string(name='StageName', description='The environment name.', example='RELEASE'),
      }
    ](name='BackendModels', description='The configurations of the backend service in the environment.'),
    backendName?: string(name='BackendName', description='The name of the backend service.', example='testoss2'),
    backendType?: string(name='BackendType', description='The type of the backend service.', example='HTTP'),
    createdTime?: string(name='CreatedTime', description='The time when the backend service was created.', example='2021-11-22T11:10:46+08:00'),
    description?: string(name='Description', description='The description of the backend service.', example='add'),
    modifiedTime?: string(name='ModifiedTime', description='The time when the backend service was modified.', example='2017-12-11T15:18:09+08:00'),
  }(name='BackendInfo', description='The information about the backend service.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='0AA90E87-3506-5AA6-AFFB-A4D53B4F6231'),
}

model DescribeBackendInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackendInfoResponseBody(name='body'),
}

/**
 * @summary Queries the information about a backend service and its URL configured for each environment.
 *
 * @param request DescribeBackendInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackendInfoResponse
 */
async function describeBackendInfoWithOptions(request: DescribeBackendInfoRequest, runtime: Util.RuntimeOptions): DescribeBackendInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackendInfo',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about a backend service and its URL configured for each environment.
 *
 * @param request DescribeBackendInfoRequest
 * @return DescribeBackendInfoResponse
 */
async function describeBackendInfo(request: DescribeBackendInfoRequest): DescribeBackendInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackendInfoWithOptions(request, runtime);
}

model DescribeBackendListRequest {
  backendName?: string(name='BackendName', description='The name of the backend service. You can use \\\\* to perform fuzzy queries.', example='test'),
  backendType?: string(name='BackendType', description='The type of the backend service.', example='HTTP'),
  pageNumber?: int32(name='PageNumber', description='The number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='test1'),
      value?: string(name='Value', description='The value of the tag.', example='value'),
    }
  ](name='Tag', description='The list of the tag.'),
}

model DescribeBackendListResponseBody = {
  backendInfoList?: [ 
    {
      backendId?: string(name='BackendId', description='The ID of the backend service.', example='35bd31d32c9c425ebbe9330db9f8c375'),
      backendName?: string(name='BackendName', description='The name of the backend service.', example='test'),
      backendType?: string(name='BackendType', description='The type of the backend service.', example='HTTP'),
      createdTime?: string(name='CreatedTime', description='The time when the backend service was created.', example='2022-01-25T11:22:29Z'),
      description?: string(name='Description', description='The description of the backend service.', example='test'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the backend service was modified.', example='2022-01-25T11:22:29Z'),
      tags?: [ 
        {
          key?: string(name='Key', description='The name of the tag.', example='groupName'),
          value?: string(name='Value', description='The value of the tag.', example='e3b881d0-e2d0-4dfb-b1fb-a2a3d1e534b7'),
        }
      ](name='Tags', description='The list of tags.'),
    }
  ](name='BackendInfoList', description='The backend services.'),
  pageNumber?: int32(name='PageNumber', description='The number of the current page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='090A0DF9-9144-5236-8CBA-E18DE317722D'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
}

model DescribeBackendListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackendListResponseBody(name='body'),
}

/**
 * @summary Queries backend services. You can filter backend services by backend service name and backend service type.
 *
 * @param request DescribeBackendListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackendListResponse
 */
async function describeBackendListWithOptions(request: DescribeBackendListRequest, runtime: Util.RuntimeOptions): DescribeBackendListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendName)) {
    query['BackendName'] = request.backendName;
  }
  if (!Util.isUnset(request.backendType)) {
    query['BackendType'] = request.backendType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackendList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries backend services. You can filter backend services by backend service name and backend service type.
 *
 * @param request DescribeBackendListRequest
 * @return DescribeBackendListResponse
 */
async function describeBackendList(request: DescribeBackendListRequest): DescribeBackendListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackendListWithOptions(request, runtime);
}

model DescribeDatasetInfoRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeDatasetInfoResponseBody = {
  datasetInfo?: {
    createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the dataset.', example='2022-09-21T12:58:43Z'),
    datasetId?: string(name='DatasetId', description='The ID of the dataset.', example='62b91a790a693238********'),
    datasetName?: string(name='DatasetName', description='The name of the dataset.', example='DatasetName'),
    datasetType?: string(name='DatasetType', description='The type of the dataset. Valid values:

*   JWT_BLOCKING: a JSON Web Token (JWT) blacklist
*   IP_WHITELIST_CIDR : an IP address whitelist
*   PARAMETER_ACCESS : parameter-based access control', example='JWT_BLOCKING'),
    modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the dataset.', example='2022-09-21T12:58:43Z'),
  }(name='DatasetInfo', description='The dataset info.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='A2C8F75E-EE84-5C64-960F-45C8********'),
}

model DescribeDatasetInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDatasetInfoResponseBody(name='body'),
}

/**
 * @summary Queries the information about a single dataset.
 *
 * @param request DescribeDatasetInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDatasetInfoResponse
 */
async function describeDatasetInfoWithOptions(request: DescribeDatasetInfoRequest, runtime: Util.RuntimeOptions): DescribeDatasetInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDatasetInfo',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about a single dataset.
 *
 * @param request DescribeDatasetInfoRequest
 * @return DescribeDatasetInfoResponse
 */
async function describeDatasetInfo(request: DescribeDatasetInfoRequest): DescribeDatasetInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDatasetInfoWithOptions(request, runtime);
}

model DescribeDatasetItemInfoRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='62b91a790a693238********'),
  datasetItemId?: string(name='DatasetItemId', description='The ID of the data entry.', example='5045****'),
  securityToken?: string(name='SecurityToken'),
  value?: string(name='Value', description='The value of the data entry.', example='106.43.XXX.XXX'),
}

model DescribeDatasetItemInfoResponseBody = {
  datasetItemInfo?: {
    createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the data entry.', example='2022-09-21T12:58:43Z'),
    datasetId?: string(name='DatasetId', description='The ID of the dataset.', example='626238665db4a5140eea3e40********'),
    datasetItemId?: string(name='DatasetItemId', description='The ID of the data entry.', example='5045****'),
    description?: string(name='Description', description='The description of the data entry.', example='Description'),
    expiredTime?: string(name='ExpiredTime', description='The time in UTC when the data entry expires. The time is in the **yyyy-MM-ddTHH:mm:ssZ** format. If this parameter is empty, the data entry does not expire.', example='2022-09-22T12:00:00Z'),
    modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the data entry.', example='2022-09-21T12:58:43Z'),
    value?: string(name='Value', description='The value of the data entry.', example='106.43.XXX.XXX'),
  }(name='DatasetItemInfo', description='The Dataset information.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='5BAFA85F-38E3-5D9E-9E32-4B09********'),
}

model DescribeDatasetItemInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDatasetItemInfoResponseBody(name='body'),
}

/**
 * @summary Queries a data entry in a custom dataset.
 *
 * @param request DescribeDatasetItemInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDatasetItemInfoResponse
 */
async function describeDatasetItemInfoWithOptions(request: DescribeDatasetItemInfoRequest, runtime: Util.RuntimeOptions): DescribeDatasetItemInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.datasetItemId)) {
    query['DatasetItemId'] = request.datasetItemId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDatasetItemInfo',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries a data entry in a custom dataset.
 *
 * @param request DescribeDatasetItemInfoRequest
 * @return DescribeDatasetItemInfoResponse
 */
async function describeDatasetItemInfo(request: DescribeDatasetItemInfoRequest): DescribeDatasetItemInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDatasetItemInfoWithOptions(request, runtime);
}

model DescribeDatasetItemListRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='602e1f6b3543200eaab0a89e********'),
  datasetItemIds?: string(name='DatasetItemIds', description='The ID of the data entry. You can enter multiple IDs. Separate them with commas (,).', example='5045****'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeDatasetItemListResponseBody = {
  datasetItemInfoList?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the data entry was created.', example='2022-09-21T12:58:43Z'),
      datasetId?: string(name='DatasetId', description='The ID of the dataset.', example='4add6a61804e47858266883e********'),
      datasetItemId?: string(name='DatasetItemId', description='The ID of the data entry.', example='5045****'),
      description?: string(name='Description', description='The description of the data entry.', example='Description'),
      expiredTime?: string(name='ExpiredTime', description='The time in UTC when the data entry expires. The time is in the **yyyy-MM-ddTHH:mm:ssZ** format. If this parameter is empty, the data entry does not expire.', example='2022-09-22T12:00:00Z'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the data entry.', example='2022-09-21T12:58:43Z'),
      value?: string(name='Value', description='The value of the data entry.', example='106.43.XXX.XXX'),
    }
  ](name='DatasetItemInfoList', description='The Dataset information.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='C6E9C6E4-608B-5C0F-9783-E288********'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='20'),
}

model DescribeDatasetItemListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDatasetItemListResponseBody(name='body'),
}

/**
 * @summary Queries the data entries of a custom dataset.
 *
 * @param request DescribeDatasetItemListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDatasetItemListResponse
 */
async function describeDatasetItemListWithOptions(request: DescribeDatasetItemListRequest, runtime: Util.RuntimeOptions): DescribeDatasetItemListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.datasetItemIds)) {
    query['DatasetItemIds'] = request.datasetItemIds;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDatasetItemList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the data entries of a custom dataset.
 *
 * @param request DescribeDatasetItemListRequest
 * @return DescribeDatasetItemListResponse
 */
async function describeDatasetItemList(request: DescribeDatasetItemListRequest): DescribeDatasetItemListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDatasetItemListWithOptions(request, runtime);
}

model DescribeDatasetListRequest {
  datasetIds?: string(name='DatasetIds', description='The IDs of the datasets.', example='4add6a61804e47858266883e********'),
  datasetName?: string(name='DatasetName', description='The name of the dataset.', example='IPwhitelist'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='env'),
      value?: string(name='Value', description='The value of the tag.', example='value'),
    }
  ](name='Tag', description='Specify the object labels to which the rule applies, and multiple labels can be set'),
}

model DescribeDatasetListResponseBody = {
  datasetInfoList?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the dataset was created. The time is displayed in UTC.', example='2022-09-21T12:58:43Z'),
      datasetId?: string(name='DatasetId', description='The dataset ID.', example='6304ce6b4ae6453f********'),
      datasetName?: string(name='DatasetName', description='The dataset name.', example='DatasetName'),
      datasetType?: string(name='DatasetType', description='The dataset type. Valid values:

*   JWT_BLOCKING : a JSON Web Token (JWT) blacklist
*   IP_WHITELIST_CIDR : an IP address whitelist
*   PARAMETER_ACCESS: a list of parameters for parameter-based access control', example='IP_WHITELIST_CIDR'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the dataset was last modified. The time is displayed in UTC.', example='2022-09-21T12:58:43Z'),
      tags?: [ 
        {
          key?: string(name='Key', description='The tag key.', example='ENV'),
          value?: string(name='Value', description='The value of the tag.', example='123'),
        }
      ](name='Tags', description='The tags.'),
    }
  ](name='DatasetInfoList', description='The returned dataset information. It is an array consisting of datasetinfo.'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D403C6E6-21B3-5B78-82DA-E3B6********'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='20'),
}

model DescribeDatasetListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDatasetListResponseBody(name='body'),
}

/**
 * @summary Queries custom datasets.
 *
 * @param request DescribeDatasetListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDatasetListResponse
 */
async function describeDatasetListWithOptions(request: DescribeDatasetListRequest, runtime: Util.RuntimeOptions): DescribeDatasetListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetIds)) {
    query['DatasetIds'] = request.datasetIds;
  }
  if (!Util.isUnset(request.datasetName)) {
    query['DatasetName'] = request.datasetName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDatasetList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries custom datasets.
 *
 * @param request DescribeDatasetListRequest
 * @return DescribeDatasetListResponse
 */
async function describeDatasetList(request: DescribeDatasetListRequest): DescribeDatasetListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDatasetListWithOptions(request, runtime);
}

model DescribeDeployApiTaskRequest {
  operationUid?: string(name='OperationUid', description='The task ID.

This parameter is required.', example='51524fb8f12846d694d0a1de9a0cf274'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeDeployApiTaskResponseBody = {
  deployedResults?: {
    deployedResult?: [ 
    {
      apiUid?: string(name='ApiUid', description='The ID of the API.', example='0433c1cd84724923b7a4f9ca1cfc249c'),
      deployedStatus?: string(name='DeployedStatus', description='The deployment status of the API.', example='OVER'),
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='Success. Request Success.'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='e8da6f6346184da9a30d0dc1888b1f3b'),
      stageName?: string(name='StageName', description='The runtime environment of the API. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
    }
  ](name='DeployedResult')
  }(name='DeployedResults', description='The returned result.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CA4B3261-F14A-5E33-8608-F75A1DF27AD4'),
}

model DescribeDeployApiTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeployApiTaskResponseBody(name='body'),
}

/**
 * @summary Queries the progress of an asynchronous API publishing task.
 *
 * @param request DescribeDeployApiTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeployApiTaskResponse
 */
async function describeDeployApiTaskWithOptions(request: DescribeDeployApiTaskRequest, runtime: Util.RuntimeOptions): DescribeDeployApiTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.operationUid)) {
    query['OperationUid'] = request.operationUid;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeployApiTask',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the progress of an asynchronous API publishing task.
 *
 * @param request DescribeDeployApiTaskRequest
 * @return DescribeDeployApiTaskResponse
 */
async function describeDeployApiTask(request: DescribeDeployApiTaskRequest): DescribeDeployApiTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeployApiTaskWithOptions(request, runtime);
}

model DescribeDeployedApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='ab7c95a01a7e42f28718f34497bbf47c'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='81750604ccff48c48f34d6c0165e09db'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE: the pre-release environment**
*   **TEST**

This parameter is required.', example='RELEASE'),
}

model DescribeDeployedApiResponseBody = {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='The signature method used by the client. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='HmacSHA256'),
  apiId?: string(name='ApiId', description='The ID of the API.', example='4eed13a57d4e42fbb51316be8a5329ff'),
  apiName?: string(name='ApiName', description='The name of the API', example='weather'),
  authType?: string(name='AuthType', description='The security authentication method of the API. Valid values:

*   **APP: Only authorized applications can call the API.**

*   **ANONYMOUS: The API can be anonymously called. In this mode, you must take note of the following rules:**

    *   All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If you make this API public, set API-specific throttling policies.', example='APP'),
  constantParameters?: {
    constantParameter?: [ 
    {
      constantValue?: string(name='ConstantValue', description='The constant value.', example='constance'),
      description?: string(name='Description', description='The description.', example='123'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      serviceParameterName?: string(name='ServiceParameterName', description='The name of the backend service parameter.', example='constance'),
    }
  ](name='ConstantParameter')
  }(name='ConstantParameters', description='The constant parameters.'),
  customSystemParameters?: {
    customSystemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='Example', example='192.168.1.1'),
      description?: string(name='Description', description='The description.', example='123'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The name of the custom system parameter.', example='appid'),
      serviceParameterName?: string(name='ServiceParameterName', description='The name of the corresponding backend parameter.', example='clientIp'),
    }
  ](name='CustomSystemParameter')
  }(name='CustomSystemParameters', description='The custom system parameters.'),
  deployedTime?: string(name='DeployedTime', description='The deployment time. Format: yyyy-mm-ddhh:mm:ss.', example='2022-07-25T17:47:51Z'),
  description?: string(name='Description', description='The description.', example='Api description'),
  disableInternet?: boolean(name='DisableInternet', description='*   Specifies whether to set DisableInternet to **true** to limit API calls to within the VPC.
*   If you set DisableInternet to **false**, the limit is lifted.

>  If you do not set this parameter, the original value is not modified.', example='true'),
  errorCodeSamples?: {
    errorCodeSample?: [ 
    {
      code?: string(name='Code', description='The error code.', example='Error'),
      description?: string(name='Description', description='The description.', example='Description'),
      message?: string(name='Message', description='The error message.', example='error message'),
    }
  ](name='ErrorCodeSample')
  }(name='ErrorCodeSamples', description='The sample error codes returned by the backend service.

For more information, see [ErrorCodeSample](https://help.aliyun.com/document_detail/44392.html).'),
  failResultSample?: string(name='FailResultSample', description='The sample error response from the backend service.', example='{"errorCode":"fail","errorMessage":"param invalid"}'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If you set **ForceNonceCheck** to **false**, the check is not performed. The default value is false when you create an API.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='bc77f5b49c974437a9912ea3755cd834'),
  groupName?: string(name='GroupName', description='The name of the API group.', example='Weather'),
  openIdConnectConfig?: {
    idTokenParamName?: string(name='IdTokenParamName', description='The name of the parameter that corresponds to the token.', example='xxx'),
    openIdApiType?: string(name='OpenIdApiType', description='The configuration of OpenID Connect authentication. Valid values:

*   **IDTOKEN: indicates the APIs that are called by clients to obtain tokens. If you specify this value, the PublicKeyId parameter and the PublicKey parameter are required.**
*   **BUSINESS: indicates business APIs. Tokens are used to call the business APIs. If you specify this value, the IdTokenParamName parameter is required.', example='IDTOKEN'),
    publicKey?: string(name='PublicKey', description='The public key of the API.', example='EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92'),
    publicKeyId?: string(name='PublicKeyId', description='The ID of the public key.', example='88483727556929326703309904351185815489'),
  }(name='OpenIdConnectConfig', description='The configuration items of the third-party OpenID Connect authentication method.'),
  regionId?: string(name='RegionId', description='The region to which the API group belongs.', example='cn-beijing'),
  requestConfig?: {
    bodyFormat?: string(name='BodyFormat', description='This parameter takes effect only when the RequestMode parameter is set to MAPPING.

The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams.', example='STREAM'),
    bodyModel?: string(name='BodyModel', description='The body model.', example='https://apigateway.aliyun.com/models/3a240a127dccXXXXXXXX947b4095/9e2df550e85b4121a79XXXXXxaab'),
    postBodyDescription?: string(name='PostBodyDescription', description='The description of the request body.', example='fwefwef'),
    requestHttpMethod?: string(name='RequestHttpMethod', description='The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    requestMode?: string(name='RequestMode', description='The request mode. Valid values:

*   MAPPING: Parameters are mapped. Unknown parameters are filtered out.
*   PASSTHROUGH: Parameters are passed through.
*   MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.', example='MAPPING'),
    requestPath?: string(name='RequestPath', description='The API request path. If the complete API URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the API request path is ` /object/add  `.', example='/api/billing/test/[type]'),
    requestProtocol?: string(name='RequestProtocol', description='The protocol type supported by the API. Valid values: HTTP, HTTPS, and WebSocket. Separate multiple values with commas (,), such as "HTTP,HTTPS".', example='HTTP'),
  }(name='RequestConfig', description='Configuration items of API requests sent by the consumer to API Gateway.

For more information, see [RequestConfig](https://help.aliyun.com/document_detail/43985.html).'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
  requestParameters?: {
    requestParameter?: [ 
    {
      apiParameterName?: string(name='ApiParameterName', description='The name of the API parameter.', example='age'),
      arrayItemsType?: string(name='ArrayItemsType', description='The type of the array element.', example='String'),
      defaultValue?: string(name='DefaultValue', description='The default value.', example='20'),
      demoValue?: string(name='DemoValue', description='Example', example='20'),
      description?: string(name='Description', description='Description', example='parameter description'),
      docOrder?: int32(name='DocOrder', description='The order in the document.', example='0'),
      docShow?: string(name='DocShow', description='Specifies whether the document is public. Valid values: PUBLIC and PRIVATE.', example='PUBLIC'),
      enumValue?: string(name='EnumValue', description='The hash values that can be entered when ParameterType is set to Int, Long, Float, Double, or String. Separate different values with commas (,), such as 1,2,3,4,9 or A,B,C,E,F.', example='boy,girl'),
      jsonScheme?: string(name='JsonScheme', description='JSON scheme', example='{}'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      maxLength?: long(name='MaxLength', description='The maximum parameter length when ParameterType is set to String.', example='123456'),
      maxValue?: long(name='MaxValue', description='The maximum parameter value when ParameterType is set to Int, Long, Float, or Double.', example='123456'),
      minLength?: long(name='MinLength', description='The minimum parameter length when ParameterType is set to String.', example='123456'),
      minValue?: long(name='MinValue', description='The minimum parameter value when ParameterType is set to Int, Long, Float, or Double.', example='123456'),
      parameterType?: string(name='ParameterType', description='The type of a request parameter. Valid values: String, Int, Long, Float, Double, and Boolean.', example='String'),
      regularExpression?: string(name='RegularExpression', description='The regular expression used for parameter validation when ParameterType is set to String.', example='xxx'),
      required?: string(name='Required', description='Indicates whether the parameter is required. Valid values: REQUIRED and OPTIONAL.', example='OPTIONAL'),
    }
  ](name='RequestParameter')
  }(name='RequestParameters', description='The parameters of API requests sent by the consumer to API Gateway.

For more information, see [RequestParameter](https://help.aliyun.com/document_detail/43986.html).'),
  resultBodyModel?: string(name='ResultBodyModel', description='The return description of the API.', example='{}'),
  resultDescriptions?: {
    resultDescription?: [ 
    {
      description?: string(name='Description', description='The description.', example='result description'),
      hasChild?: boolean(name='HasChild', description='Specifies whether a subnode exists.', example='false'),
      id?: string(name='Id', description='The ID of the result.', example='id'),
      key?: string(name='Key', description='The primary key of the result.', example='DEMO'),
      mandatory?: boolean(name='Mandatory', description='Specifies whether the parameter is required.', example='true'),
      name?: string(name='Name', description='The name of the result.', example='fwqf'),
      pid?: string(name='Pid', description='The ID of the parent node.', example='pid'),
      type?: string(name='Type', description='The type of the result.', example='String'),
    }
  ](name='ResultDescription')
  }(name='ResultDescriptions', description='The return description of the API.'),
  resultSample?: string(name='ResultSample', description='The sample response from the backend service.', example='{code: 200, message:\\\\"success\\\\", data: \\\\"\\\\"}'),
  resultType?: string(name='ResultType', description='The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML. Default value: JSON.', example='HTML'),
  serviceConfig?: {
    functionComputeConfig?: {
      contentTypeCatagory?: string(name='ContentTypeCatagory', description='The ContentType header type used when you call the backend service over HTTP.

*   **DEFAULT: the default header type in API Gateway.**
*   **CUSTOM: a custom header type.**
*   **CLIENT: the ContentType header type of the client.', example='DEFAULT'),
      contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/x-www-form-urlencoded; charset=UTF-8'),
      fcBaseUrl?: string(name='FcBaseUrl', description='The root path of Function Compute.', example='https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/'),
      fcType?: string(name='FcType', description='The type of the Function Compute instance.', example='HttpTrigger'),
      functionName?: string(name='FunctionName', description='The function name defined in Function Compute.', example='domain_business_control'),
      method?: string(name='Method', description='The request method.', example='GET'),
      onlyBusinessPath?: boolean(name='OnlyBusinessPath', description='The backend only receives the service path.', example='false'),
      path?: string(name='Path', description='The API request path.', example='/api/offline/cacheData'),
      qualifier?: string(name='Qualifier', description='The alias of the function.', example='2'),
      regionId?: string(name='RegionId', description='The region where the API is located.', example='cn-beijing'),
      roleArn?: string(name='RoleArn', description='The Alibaba Cloud Resource Name (ARN) of the RAM role to be assumed by API Gateway to access Function Compute.', example='acs:ram::111***:role/aliyunserviceroleforsas'),
      serviceName?: string(name='ServiceName', description='The service name defined in Function Compute.', example='fcservicename'),
    }(name='FunctionComputeConfig', description='Backend configuration items when the backend service is Function Compute'),
    mock?: string(name='Mock', description='Specifies whether to enable the Mock mode. Valid values:

*   **TRUE: The Mock mode is enabled.**
*   **FALSE: The Mock mode is not enabled.', example='TRUE'),
    mockHeaders?: {
      mockHeader?: [ 
      {
        headerName?: string(name='HeaderName', description='The name of the HTTP header parameter.', example='Content-Type'),
        headerValue?: string(name='HeaderValue', description='The value of the HTTP header parameter.', example='86400'),
      }
    ](name='MockHeader')
    }(name='MockHeaders', description='The simulated Headers.'),
    mockResult?: string(name='MockResult', description='The result returned when the Mock mode is enabled.', example='test result'),
    mockStatusCode?: int32(name='MockStatusCode', description='The status code returned for service mocking.', example='200'),
    serviceAddress?: string(name='ServiceAddress', description='The URL used to call the back-end service. If the complete back-end service URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the value of ServiceAddress is **http://api.a.com:8080**.``', example='http://api.a.com:8080'),
    serviceHttpMethod?: string(name='ServiceHttpMethod', description='The HTTP method used to call a backend service. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='POST'),
    servicePath?: string(name='ServicePath', example='/object/add'),
    serviceProtocol?: string(name='ServiceProtocol', description='The backend service protocol. Currently, only HTTP, HTTPS, and FunctionCompute are supported.', example='HTTP'),
    serviceTimeout?: int32(name='ServiceTimeout', description='The timeout period of the backend service, in millisecond.', example='1000'),
    serviceVpcEnable?: string(name='ServiceVpcEnable', description='Specifies whether to enable the VPC channel. Valid values:

*   **TRUE**: The VPC channel is enabled. You must create the corresponding VPC access authorization before you can enable a VPC channel.
*   **FALSE**: The VPC channel is not enabled.', example='TRUE'),
    vpcConfig?: {
      instanceId?: string(name='InstanceId', description='The IDs of the ELB and SLB instances in the VPC.', example='i-bp1h497hkijewv2***'),
      name?: string(name='Name', description='The name of the VPC access authorization.', example='glmall-app-test'),
      port?: int32(name='Port', description='The port number that corresponds to the instance.', example='8080'),
      vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2zeafsc3fygk1***'),
    }(name='VpcConfig', description='Configuration items related to VPC channels'),
    vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-uf6kg9x8sx2tbxxxx'),
  }(name='ServiceConfig', description='The configuration items of API requests sent by API Gateway to the backend service.

For more information, see [ServiceConfig](https://help.aliyun.com/document_detail/43987.html).'),
  serviceParameters?: {
    serviceParameter?: [ 
    {
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterType?: string(name='ParameterType', description='The data type of the back-end service parameter.', example='String'),
      serviceParameterName?: string(name='ServiceParameterName', description='The name of the backend service parameter.', example='clientIp'),
    }
  ](name='ServiceParameter')
  }(name='ServiceParameters', description='The parameters of API requests sent by API Gateway to the backend service.

For more information, see [ServiceParameter](https://help.aliyun.com/document_detail/43988.html).'),
  serviceParametersMap?: {
    serviceParameterMap?: [ 
    {
      requestParameterName?: string(name='RequestParameterName', description='The name of the front-end input parameter.', example='sex'),
      serviceParameterName?: string(name='ServiceParameterName', description='The name of the backend service parameter.', example='sex'),
    }
  ](name='ServiceParameterMap')
  }(name='ServiceParametersMap', description='The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.

For more information, see [ServiceParameterMap](https://help.aliyun.com/document_detail/43989.html).'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE: the pre-release environment**
*   **TEST**', example='RELEASE'),
  systemParameters?: {
    systemParameter?: [ 
    {
      demoValue?: string(name='DemoValue', description='Examples', example='192.168.1.1'),
      description?: string(name='Description', description='The description.', example='QueryParamDTO'),
      location?: string(name='Location', description='The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.', example='HEAD'),
      parameterName?: string(name='ParameterName', description='The name of the system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, and CaProxy.', example='CaClientIp'),
      serviceParameterName?: string(name='ServiceParameterName', description='The name of the corresponding backend parameter.', example='clientIp'),
    }
  ](name='SystemParameter')
  }(name='SystemParameters', description='System parameters'),
  visibility?: string(name='Visibility', description='Specifies whether to make the API public. Valid values:

*   **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.**
*   **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.', example='PUBLIC'),
}

model DescribeDeployedApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeployedApiResponseBody(name='body'),
}

/**
 * @summary Queries the definition of an API that takes effect in an environment. The definition may differ from the definition being edited.
 *
 * @param request DescribeDeployedApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeployedApiResponse
 */
async function describeDeployedApiWithOptions(request: DescribeDeployedApiRequest, runtime: Util.RuntimeOptions): DescribeDeployedApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeployedApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the definition of an API that takes effect in an environment. The definition may differ from the definition being edited.
 *
 * @param request DescribeDeployedApiRequest
 * @return DescribeDeployedApiResponse
 */
async function describeDeployedApi(request: DescribeDeployedApiRequest): DescribeDeployedApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeployedApiWithOptions(request, runtime);
}

model DescribeDeployedApisRequest {
  apiId?: string(name='ApiId', description='The ID of the API.', example='c076144d7878437b8f82fb85890ce6a0'),
  apiMethod?: string(name='ApiMethod', description='The HTTP method of the API request.', example='POST'),
  apiName?: string(name='ApiName', description='The name of the API. The name is used for fuzzy match.', example='weather'),
  apiPath?: string(name='ApiPath', description='The request path of the API.', example='/st4'),
  enableTagAuth?: boolean(name='EnableTagAuth', description='Specifies whether to enable tag verification.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='appname'),
      value?: string(name='Value', description='The tag value.', example='testapp'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeDeployedApisResponseBody = {
  deployedApis?: {
    deployedApiItem?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='c076144d7878437b8f82fb85890ce6a0'),
      apiMethod?: string(name='ApiMethod', description='The HTTP method of the API request.', example='POST'),
      apiName?: string(name='ApiName', description='The name of the API.', example='DescribeObjects'),
      apiPath?: string(name='ApiPath', description='The request path of the API.', example='/trademark/search'),
      deployedTime?: string(name='DeployedTime', description='The publising time (UTC) of the API.', example='2016-07-23T08:28:48Z'),
      description?: string(name='Description', description='The description of the API.', example='Queries objects by pages'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='63be9002440b4778a61122f14c2b2bbb'),
      groupName?: string(name='GroupName', description='The name of the group to which the API belongs.', example='myGroup3'),
      regionId?: string(name='RegionId', description='The region where the API is located.', example='cn-qingdao'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
      visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values:

*   **PUBLIC**
*   **PRIVATE**', example='PUBLIC'),
    }
  ](name='DeployedApiItem')
  }(name='DeployedApis', description='The returned API information. It is an array consisting of DeployedApiItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ002'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeDeployedApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeployedApisResponseBody(name='body'),
}

/**
 * @summary Queries the APIs that have been published to a specified environment.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeDeployedApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeployedApisResponse
 */
async function describeDeployedApisWithOptions(request: DescribeDeployedApisRequest, runtime: Util.RuntimeOptions): DescribeDeployedApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiMethod)) {
    query['ApiMethod'] = request.apiMethod;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.apiPath)) {
    query['ApiPath'] = request.apiPath;
  }
  if (!Util.isUnset(request.enableTagAuth)) {
    query['EnableTagAuth'] = request.enableTagAuth;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeployedApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs that have been published to a specified environment.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeDeployedApisRequest
 * @return DescribeDeployedApisResponse
 */
async function describeDeployedApis(request: DescribeDeployedApisRequest): DescribeDeployedApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeployedApisWithOptions(request, runtime);
}

model DescribeDomainRequest {
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeDomainResponseBody = {
  certificateBody?: string(name='CertificateBody', description='The content of the certificate.', example='xxx'),
  certificateId?: string(name='CertificateId', description='The unique ID of the SSL certificate, which is automatically generated by the system.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
  certificateName?: string(name='CertificateName', description='The name of the SSL certificate.', example='myCertificate'),
  certificatePrivateKey?: string(name='CertificatePrivateKey', description='The private key of the SSL certificate.', example='xxx'),
  certificateValidEnd?: long(name='CertificateValidEnd', description='证书失效时间戳（毫秒）', example='1704038400000'),
  certificateValidStart?: long(name='CertificateValidStart', description='证书生效时间戳（毫秒）', example='1672502400000'),
  domainBindingStatus?: string(name='DomainBindingStatus', description='The binding status of the custom domain name. Valid values:

*   BINDING: The domain name has been bound.
*   BOUND: The domain name has not been bound.', example='BINDING'),
  domainCNAMEStatus?: string(name='DomainCNAMEStatus', description='The domain name resolution status. Valid values:

*   RESOLVED: The domain name has been resolved.
*   UNRESOLVED: The domain name has not been resolved.', example='RESOLVED'),
  domainLegalStatus?: string(name='DomainLegalStatus', description='The validity status of the domain name. Valid values:

*   NORMAL
*   ABNORMAL: This status affects API calls and must be resolved as soon as possible.', example='NORMAL'),
  domainName?: string(name='DomainName', description='The custom domain name.', example='api.demo.com'),
  domainRemark?: string(name='DomainRemark', description='Remarks about the domain name, such as the cause of an exception.', example='The domain name does not have an ICP filing.'),
  domainWebSocketStatus?: string(name='DomainWebSocketStatus', description='The status of the domain name that uses WebSocket.', example='NORMAL'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='927d50c0f2e54b359919923d908bb015'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
  subDomain?: string(name='SubDomain', description='The second-level domain name that is automatically assigned to the API group.', example='xxx-cn-hangzhou.alicloudapi.com'),
}

model DescribeDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDomainResponseBody(name='body'),
}

/**
 * @summary Queries details about a bound custom domain name, including the automatically assigned second-level domain name, custom domain name, and SSL certificate.
 *
 * @param request DescribeDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDomainResponse
 */
async function describeDomainWithOptions(request: DescribeDomainRequest, runtime: Util.RuntimeOptions): DescribeDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDomain',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries details about a bound custom domain name, including the automatically assigned second-level domain name, custom domain name, and SSL certificate.
 *
 * @param request DescribeDomainRequest
 * @return DescribeDomainResponse
 */
async function describeDomain(request: DescribeDomainRequest): DescribeDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainWithOptions(request, runtime);
}

model DescribeGroupLatencyRequest {
  endTime?: string(name='EndTime', description='The end time of the time range to query. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ.

This parameter is required.', example='2023-04-14T06:26:14Z'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='d825094fdd114a869f5adb443d9b7ead'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which you want to perform the query. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time of the time range to query. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ.

This parameter is required.', example='2023-03-30T16:00:00Z'),
}

model DescribeGroupLatencyResponseBody = {
  latencyPacket?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   latency: the backend processing latency
*   gatewayLatency: the API Gateway processing latency', example='latency'),
      itemTime?: string(name='ItemTime', description='The point in time when the latency data was collected. The format is YYYY-MM-DDThh:mm:ssZ.', example='2023-03-30T16:10:00Z'),
      itemValue?: string(name='ItemValue', description='The latency. Unit: ms.', example='100.0'),
    }
  ](name='MonitorItem')
  }(name='LatencyPacket', description='The latency information.'),
  requestId?: string(name='RequestId', description='The request ID.', example='75DC3AB0-421C-5371-8170-86AEABF77AD0'),
}

model DescribeGroupLatencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupLatencyResponseBody(name='body'),
}

/**
 * @summary Queries the average latency of an API group in an environment.
 *
 * @param request DescribeGroupLatencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupLatencyResponse
 */
async function describeGroupLatencyWithOptions(request: DescribeGroupLatencyRequest, runtime: Util.RuntimeOptions): DescribeGroupLatencyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupLatency',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the average latency of an API group in an environment.
 *
 * @param request DescribeGroupLatencyRequest
 * @return DescribeGroupLatencyResponse
 */
async function describeGroupLatency(request: DescribeGroupLatencyRequest): DescribeGroupLatencyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupLatencyWithOptions(request, runtime);
}

model DescribeGroupQpsRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-08-23T07:27:44Z'),
  groupId?: string(name='GroupId', description='The API group ID.

This parameter is required.', example='264c60db9f764345a13ac5c825b229b9'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment to which the API group is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-08-12T06:09:52Z'),
}

model DescribeGroupQpsResponseBody = {
  groupQps?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The point in time.', example='2023-08-02T09:15:00Z'),
      itemValue?: string(name='ItemValue', description='The number of requests at the specified point in time.', example='17'),
    }
  ](name='MonitorItem')
  }(name='GroupQps', description='The number of requests directed to the API group.'),
  requestId?: string(name='RequestId', description='The request ID.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model DescribeGroupQpsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupQpsResponseBody(name='body'),
}

/**
 * @summary Queries the statistics on the number of requests directed to an API group within a period of time.
 *
 * @param request DescribeGroupQpsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupQpsResponse
 */
async function describeGroupQpsWithOptions(request: DescribeGroupQpsRequest, runtime: Util.RuntimeOptions): DescribeGroupQpsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupQps',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the statistics on the number of requests directed to an API group within a period of time.
 *
 * @param request DescribeGroupQpsRequest
 * @return DescribeGroupQpsResponse
 */
async function describeGroupQps(request: DescribeGroupQpsRequest): DescribeGroupQpsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupQpsWithOptions(request, runtime);
}

model DescribeGroupTrafficRequest {
  endTime?: string(name='EndTime', description='The end time for the query. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ.

This parameter is required.', example='2023-06-16T02:16:53Z'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='16df9d11caa04900bcafe23b38a81600'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment to which the APIs in the API group are published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time for the query. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ.

This parameter is required.', example='2023-01-29T01:27:43Z'),
}

model DescribeGroupTrafficResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
  trafficPerSecond?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   inbound: traffic consumed by requests
*   outbound: traffic consumed by responses', example='inbound'),
      itemTime?: string(name='ItemTime', description='The corresponding time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ.', example='2023-01-29T01:30:00Z'),
      itemValue?: string(name='ItemValue', description='The traffic volume per second.', example='100.0'),
    }
  ](name='MonitorItem')
  }(name='TrafficPerSecond', description='The traffic information per second.'),
}

model DescribeGroupTrafficResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupTrafficResponseBody(name='body'),
}

/**
 * @summary Queries the traffic of an API group.
 *
 * @param request DescribeGroupTrafficRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupTrafficResponse
 */
async function describeGroupTrafficWithOptions(request: DescribeGroupTrafficRequest, runtime: Util.RuntimeOptions): DescribeGroupTrafficResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupTraffic',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the traffic of an API group.
 *
 * @param request DescribeGroupTrafficRequest
 * @return DescribeGroupTrafficResponse
 */
async function describeGroupTraffic(request: DescribeGroupTrafficRequest): DescribeGroupTrafficResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupTrafficWithOptions(request, runtime);
}

model DescribeHistoryApisRequest {
  apiId?: string(name='ApiId', description='The ID of the API.', example='a12068f555964ca8a0c9c33288f1e5a7'),
  apiName?: string(name='ApiName', description='The name of the API. The name is used for fuzzy match.', example='getPersonInfo'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='0ccb66aadb5345b78a40f57d192d8aa4'),
  pageNumber?: string(name='PageNumber', description='The page number of the current page.', example='2'),
  pageSize?: string(name='PageSize', description='The number of entries to return on each page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
}

model DescribeHistoryApisResponseBody = {
  apiHisItems?: {
    apiHisItem?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='5af418828f0344a3b588c0cc1331a3bc'),
      apiName?: string(name='ApiName', description='The API name.', example='v2_role_assign'),
      deployedTime?: string(name='DeployedTime', description='The time when the API was published. The time is displayed in UTC.', example='2016-07-20T08:28:48Z'),
      description?: string(name='Description', description='The API description.', example='Creates an object'),
      groupId?: string(name='GroupId', description='The API group ID.', example='1084f9034c744137901057206b39d2b6'),
      groupName?: string(name='GroupName', description='The name of the API group to which the API belongs.', example='myGroup2'),
      historyVersion?: string(name='HistoryVersion', description='The historical version of the API definition.', example='20210915101416294'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-qingdao'),
      stageAlias?: string(name='StageAlias', description='The environment alias.', example='Online'),
      stageName?: string(name='StageName', description='The environment name. Valid values:

*   **RELEASE**
*   **TEST**', example='RELEASE'),
      status?: string(name='Status', description='Indicates whether an API version is effective. Valid values: ONLINE and OFFLINE.', example='ONLINE'),
    }
  ](name='ApiHisItem')
  }(name='ApiHisItems', description='The returned API information. It is an array consisting of ApiHisItems.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 50. Default value: 10.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeHistoryApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHistoryApisResponseBody(name='body'),
}

/**
 * @summary Queries the historical versions of an API.
 *
 * @param request DescribeHistoryApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHistoryApisResponse
 */
async function describeHistoryApisWithOptions(request: DescribeHistoryApisRequest, runtime: Util.RuntimeOptions): DescribeHistoryApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHistoryApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the historical versions of an API.
 *
 * @param request DescribeHistoryApisRequest
 * @return DescribeHistoryApisResponse
 */
async function describeHistoryApis(request: DescribeHistoryApisRequest): DescribeHistoryApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHistoryApisWithOptions(request, runtime);
}

model DescribeImportOASTaskRequest {
  operationId?: string(name='OperationId', description='The ID of the asynchronous API import task that was generated during the import operation. This ID is used to query the execution status of the API import task.

This parameter is required.', example='4c53ccf1d40c489686d1adf5c2644a7f'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeImportOASTaskResponseBody = {
  apiResults?: {
    apiResult?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='c5a0c2900ff746b789c007545be22fb8'),
      apiName?: string(name='ApiName', description='The API name.', example='GetByCreatorIdUsingGET'),
      description?: string(name='Description', description='The API description.', example='release data api 411055691505041'),
      errorMessage?: string(name='ErrorMessage', description='The cause of the failure if the API fails to be imported.', example='Internal Error'),
      groupId?: string(name='GroupId', description='The API group ID.', example='736508d885074167ba8fbce3bc95ea0b'),
      method?: string(name='Method', description='The HTTP request HTTP method of the API.', example='GET'),
      path?: string(name='Path', description='The request path of the API.', example='/creator/getByCreatorId'),
      updateStatus?: string(name='UpdateStatus', description='The execution status of the subtask. Valid values:

*   RUNNING
*   WAIT
*   OVER
*   FAIL
*   CANCEL', example='WAIT'),
    }
  ](name='ApiResult')
  }(name='ApiResults', description='The execution status of the subtask. Valid values:

*   RUNNING
*   WAIT
*   OVER
*   FAIL
*   CANCEL'),
  modelResults?: {
    modelResult?: [ 
    {
      errorMessage?: string(name='ErrorMessage', description='The cause of the failure if the model fails to be imported.', example='Internal Error'),
      groupId?: string(name='GroupId', description='The API group ID.', example='736508d885074167ba8fbce3bc95ea0b'),
      modelId?: string(name='ModelId', description='The ID of the imported model.', example='6b48d724c921415486e190c494dd6bf8'),
      modelName?: string(name='ModelName', description='The model name.', example='Pet'),
      updateStatus?: string(name='UpdateStatus', description='The execution status of the subtask. Valid values:

*   RUNNING
*   WAIT
*   OVER
*   FAIL
*   CANCEL', example='FAIL'),
    }
  ](name='ModelResult')
  }(name='ModelResults', description='The execution status of the subtask. Valid values:

*   RUNNING
*   WAIT
*   OVER
*   FAIL
*   CANCEL'),
  requestId?: string(name='RequestId', description='The request ID.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
  taskStatus?: string(name='TaskStatus', description='The status of the import task. Valid values:

*   Running
*   Finished', example='Finished'),
}

model DescribeImportOASTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeImportOASTaskResponseBody(name='body'),
}

/**
 * @summary Queries the result of an OAS API import task.
 *
 * @param request DescribeImportOASTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeImportOASTaskResponse
 */
async function describeImportOASTaskWithOptions(request: DescribeImportOASTaskRequest, runtime: Util.RuntimeOptions): DescribeImportOASTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.operationId)) {
    query['OperationId'] = request.operationId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeImportOASTask',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the result of an OAS API import task.
 *
 * @param request DescribeImportOASTaskRequest
 * @return DescribeImportOASTaskResponse
 */
async function describeImportOASTask(request: DescribeImportOASTaskRequest): DescribeImportOASTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeImportOASTaskWithOptions(request, runtime);
}

model DescribeInstanceClusterInfoRequest {
  instanceClusterName?: string(name='InstanceClusterName', description='The name of the dedicated instance cluster.', example='testvpc'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeInstanceClusterInfoResponseBody = {
  createdTime?: string(name='CreatedTime', description='The time when the cluster was created.', example='2022-10-10T18:29:27'),
  description?: string(name='Description', description='The cluster description, which can be up to 200 characters in length.', example='v0.0.4'),
  instanceClusterAttribute?: {
    connectCidrBlocks?: string(name='ConnectCidrBlocks', description='The internal CIDR block of the user VPC that can be accessed by the cluster if the cluster consists of VPC integration instances.', example='["192.168.1.0/24","192.168.0.0/24"]'),
    connectVpcId?: string(name='ConnectVpcId', description='The ID of the user VPC that is connected to the cluster if the cluster consists of VPC integration instances.', example='vpc-p0w3kxxxxxxxxxxxxxxxx'),
    egressIpv6Enable?: boolean(name='EgressIpv6Enable', description='Indicates whether outbound IPv6 traffic is supported.', example='true'),
    httpsPolicies?: string(name='HttpsPolicies', description='The HTTPS security policy.', example='HTTPS2_TLS1_0'),
    IPV4AclId?: string(name='IPV4AclId', description='The ID of the IPv4 access control list (ACL).', example='acl-t4n8i4rvvp70kcyuoXXXX'),
    IPV4AclName?: string(name='IPV4AclName', description='The name of the IPv4 ACL.', example='test-black'),
    IPV4AclStatus?: string(name='IPV4AclStatus', description='Indicates whether IPv4 access control is enabled. Valid values:

*   on
*   off', example='on'),
    IPV4AclType?: string(name='IPV4AclType', description='The type of the IPv4 ACL.

*   black: blacklist
*   white: whitelist', example='black'),
    IPV6AclId?: string(name='IPV6AclId', description='The ID of the IPv6 ACL.', example='acl-t4nevzhwbpe7cup18XXXX'),
    IPV6AclName?: string(name='IPV6AclName', description='The name of the IPv6 ACL.', example='test'),
    IPV6AclStatus?: string(name='IPV6AclStatus', description='Indicates whether IPv6 access control is enabled. Valid values:

*   **on**
*   **off**', example='on'),
    IPV6AclType?: string(name='IPV6AclType', description='The type of the IPv6 ACL. Valid values:

*   black: blacklist
*   white: whitelist', example='white'),
    internetEgressAddress?: string(name='InternetEgressAddress', description='The outbound public IP address.', example='39.106.XX.XX'),
    intranetEgressAddress?: string(name='IntranetEgressAddress', description='The outbound private IP address.', example='100.104.XX.XX/26'),
    intranetSegments?: string(name='IntranetSegments', description='The custom CIDR block. The configured CIDR block is considered as a private block.', example='123.0.0.1'),
    supportIpv6?: boolean(name='SupportIpv6', description='Indicates whether IPv6 traffic is supported.', example='true'),
    userVpcId?: string(name='UserVpcId', description='The ID of the client VPC.', example='vpc-2zew2v4vcg78mXXXX'),
    userVswitchId?: string(name='UserVswitchId', description='The vSwitch of the client VPC.', example='vsw-2zecr5r7ao44tslsXXXX'),
    vipTypeList?: string(name='VipTypeList', description='The VIPs of the cluster.', example='VPC_INTERNET_IPV6'),
    vpcIntranetEnable?: boolean(name='VpcIntranetEnable', description='Indicates whether a virtual private cloud (VPC) domain name is enabled.'),
    vpcOwnerId?: long(name='VpcOwnerId', description='The ID of the account to which the VPC belongs.', example='165438596694XXXX'),
    vpcSlbIntranetEnable?: boolean(name='VpcSlbIntranetEnable', description='Indicates whether self-calling is enabled.', example='false'),
  }(name='InstanceClusterAttribute', description='The cluster details.'),
  instanceClusterId?: string(name='InstanceClusterId', description='The cluster ID.', example='apigateway-ht-04e41d95e9c1'),
  instanceClusterName?: string(name='InstanceClusterName', description='The cluster name.', example='test'),
  instanceClusterStatus?: string(name='InstanceClusterStatus', description='The cluster status.', example='RUNNING'),
  instanceClusterType?: string(name='InstanceClusterType', description='The cluster type.', example='normal'),
  instanceClusterVersion?: string(name='InstanceClusterVersion', description='The cluster version.', example='3.5.3.856'),
  instanceList?: {
    instance?: [ 
    {
      errorMessage?: string(name='ErrorMessage', description='The error message returned if the call fails.', example='Instance not found.'),
      instanceId?: string(name='InstanceId', description='The instance ID.', example='apigateway-ht-04e41d95e9c1'),
      instanceName?: string(name='InstanceName', description='The instance name.', example='tf-testacceu-central-1apigatewayinstance8752'),
      status?: string(name='Status', description='The instance status.', example='RUNNING'),
    }
  ](name='Instance')
  }(name='InstanceList', description='The dedicated instances contained in the cluster.'),
  modifiedTime?: string(name='ModifiedTime', description='The time when the cluster was last modified.', example='2023-06-19 10:40:29 +0800'),
  regionId?: string(name='RegionId', description='The region ID of the cluster.', example='cn-hangzhou'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DescribeInstanceClusterInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceClusterInfoResponseBody(name='body'),
}

/**
 * @summary Queries the information about a dedicated instance cluster.
 *
 * @param request DescribeInstanceClusterInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceClusterInfoResponse
 */
async function describeInstanceClusterInfoWithOptions(request: DescribeInstanceClusterInfoRequest, runtime: Util.RuntimeOptions): DescribeInstanceClusterInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceClusterName)) {
    query['InstanceClusterName'] = request.instanceClusterName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceClusterInfo',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about a dedicated instance cluster.
 *
 * @param request DescribeInstanceClusterInfoRequest
 * @return DescribeInstanceClusterInfoResponse
 */
async function describeInstanceClusterInfo(request: DescribeInstanceClusterInfoRequest): DescribeInstanceClusterInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceClusterInfoWithOptions(request, runtime);
}

model DescribeInstanceClusterListRequest {
  instanceClusterId?: string(name='InstanceClusterId', description='The cluster ID.', example='apigateway-cluster-hz-xxxxxxxxxxxx'),
  instanceClusterName?: string(name='InstanceClusterName', description='The cluster name.', example='test-cluster'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeInstanceClusterListResponseBody = {
  instanceClusters?: {
    instanceCluster?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the cluster was created. The time is displayed in UTC.', example='2023-08-14T17:46:59+08:00'),
      description?: string(name='Description', description='The cluster description.', example='Test TrafficControl'),
      instanceClusterId?: string(name='InstanceClusterId', description='The cluster ID.', example='apigateway-cluster-hz-xxxxxxxxxxxx'),
      instanceClusterName?: string(name='InstanceClusterName', description='The cluster name.', example='test-cluster'),
      instanceClusterStatus?: string(name='InstanceClusterStatus', description='The cluster status.', example='RUNNING'),
      instanceClusterType?: string(name='InstanceClusterType', description='The cluster type.', example='normal'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the cluster was last modified. The time is displayed in UTC.', example='2024-01-12T10:11:08+08:00'),
      regionId?: string(name='RegionId', description='The region ID of the cluster.', example='cn-shenzhen'),
    }
  ](name='InstanceCluster')
  }(name='InstanceClusters', description='The instance cluster list.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'),
}

model DescribeInstanceClusterListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceClusterListResponseBody(name='body'),
}

/**
 * @summary Queries dedicated instance clusters.
 *
 * @param request DescribeInstanceClusterListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceClusterListResponse
 */
async function describeInstanceClusterListWithOptions(request: DescribeInstanceClusterListRequest, runtime: Util.RuntimeOptions): DescribeInstanceClusterListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceClusterId)) {
    query['InstanceClusterId'] = request.instanceClusterId;
  }
  if (!Util.isUnset(request.instanceClusterName)) {
    query['InstanceClusterName'] = request.instanceClusterName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceClusterList',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries dedicated instance clusters.
 *
 * @param request DescribeInstanceClusterListRequest
 * @return DescribeInstanceClusterListResponse
 */
async function describeInstanceClusterList(request: DescribeInstanceClusterListRequest): DescribeInstanceClusterListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceClusterListWithOptions(request, runtime);
}

model DescribeInstanceDropConnectionsRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2023-01-31T07:00:09Z'),
  instanceId?: string(name='InstanceId', description='The ID of the dedicated instance.

This parameter is required.', example='apigateway-cn-n6w1v1234501'),
  sbcName?: string(name='SbcName', description='The statistical metric. Valid values:

*   Maximum
*   Minimum
*   Average

This parameter is required.', example='Maximum'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2023-01-31T06:00:09Z'),
}

model DescribeInstanceDropConnectionsResponseBody = {
  instanceDropConnections?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard. Format: YYYY-MM-DDThh:mm:ssZ', example='2023-01-31T01:11:00Z'),
      itemValue?: string(name='ItemValue', description='The number of dropped packets in the instance.', example='0.0'),
    }
  ](name='MonitorItem')
  }(name='InstanceDropConnections', description='The list of dropped connections in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DescribeInstanceDropConnectionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceDropConnectionsResponseBody(name='body'),
}

/**
 * @summary Queries the number of lost connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceDropConnectionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceDropConnectionsResponse
 */
async function describeInstanceDropConnectionsWithOptions(request: DescribeInstanceDropConnectionsRequest, runtime: Util.RuntimeOptions): DescribeInstanceDropConnectionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sbcName)) {
    query['SbcName'] = request.sbcName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceDropConnections',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of lost connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceDropConnectionsRequest
 * @return DescribeInstanceDropConnectionsResponse
 */
async function describeInstanceDropConnections(request: DescribeInstanceDropConnectionsRequest): DescribeInstanceDropConnectionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceDropConnectionsWithOptions(request, runtime);
}

model DescribeInstanceDropPacketRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-12-16T02:04:36Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-v641b9dxc00p'),
  sbcName?: string(name='SbcName', description='The statistical metric. Valid values:

*   Maximum
*   Minimum
*   Average

This parameter is required.', example='Maximum'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-09-06T04:00:36Z'),
}

model DescribeInstanceDropPacketResponseBody = {
  instanceDropPacket?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   InstanceDropPacketRX: the number of inbound packets dropped in the instance per second.
*   InstanceDropPacketTX: the number of outbound packets dropped in the instance per second.', example='InstanceDropPacketRX'),
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-09-06T04:00:36Z'),
      itemValue?: string(name='ItemValue', description='The number of dropped packets in the instance.', example='0.0'),
    }
  ](name='MonitorItem')
  }(name='InstanceDropPacket', description='The list of dropped packets in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ001'),
}

model DescribeInstanceDropPacketResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceDropPacketResponseBody(name='body'),
}

/**
 * @summary Queries the number of dropped packets within a period of time.
 *
 * @param request DescribeInstanceDropPacketRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceDropPacketResponse
 */
async function describeInstanceDropPacketWithOptions(request: DescribeInstanceDropPacketRequest, runtime: Util.RuntimeOptions): DescribeInstanceDropPacketResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sbcName)) {
    query['SbcName'] = request.sbcName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceDropPacket',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of dropped packets within a period of time.
 *
 * @param request DescribeInstanceDropPacketRequest
 * @return DescribeInstanceDropPacketResponse
 */
async function describeInstanceDropPacket(request: DescribeInstanceDropPacketRequest): DescribeInstanceDropPacketResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceDropPacketWithOptions(request, runtime);
}

model DescribeInstanceHttpCodeRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-07-21T06:05:52Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-m7r227yy2004'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API is requested. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-04-14T02:12:10Z'),
}

model DescribeInstanceHttpCodeResponseBody = {
  instanceHttpCode?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The HTTP status code returned.', example='404'),
      itemValue?: string(name='ItemValue', description='The corresponding value.', example='1'),
    }
  ](name='MonitorItem')
  }(name='InstanceHttpCode', description='The HTTP status codes.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='AD00F8C0-311B-54A9-ADE2-2436771012DA'),
}

model DescribeInstanceHttpCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceHttpCodeResponseBody(name='body'),
}

/**
 * @summary Queries the distribution of HTTP status codes of requests to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceHttpCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceHttpCodeResponse
 */
async function describeInstanceHttpCodeWithOptions(request: DescribeInstanceHttpCodeRequest, runtime: Util.RuntimeOptions): DescribeInstanceHttpCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceHttpCode',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the distribution of HTTP status codes of requests to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceHttpCodeRequest
 * @return DescribeInstanceHttpCodeResponse
 */
async function describeInstanceHttpCode(request: DescribeInstanceHttpCodeRequest): DescribeInstanceHttpCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceHttpCodeWithOptions(request, runtime);
}

model DescribeInstanceLatencyRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-09-06T02:05:13Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-v641jf5tt01v'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API is requested. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-09-15T11:07:05Z'),
}

model DescribeInstanceLatencyResponseBody = {
  instanceLatency?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   gatewayLatency API: the processing latency of API Gateway
*   latency: the processing latency of the backend service.', example='latency'),
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-09-06T02:05:13Z'),
      itemValue?: string(name='ItemValue', description='The value of the average latency.', example='10'),
    }
  ](name='MonitorItem')
  }(name='InstanceLatency', description='The list of average latencies in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DescribeInstanceLatencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceLatencyResponseBody(name='body'),
}

/**
 * @summary Queries the average latency of a dedicated instance over a period of time.
 *
 * @param request DescribeInstanceLatencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceLatencyResponse
 */
async function describeInstanceLatencyWithOptions(request: DescribeInstanceLatencyRequest, runtime: Util.RuntimeOptions): DescribeInstanceLatencyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceLatency',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the average latency of a dedicated instance over a period of time.
 *
 * @param request DescribeInstanceLatencyRequest
 * @return DescribeInstanceLatencyResponse
 */
async function describeInstanceLatency(request: DescribeInstanceLatencyRequest): DescribeInstanceLatencyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceLatencyWithOptions(request, runtime);
}

model DescribeInstanceNewConnectionsRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-10-08T02:08:00Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-2r426lavr001'),
  sbcName?: string(name='SbcName', description='The statistical metric. Valid values:

*   Maximum
*   Minimum
*   Average

This parameter is required.', example='Maximum'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-10-01T02:08:00Z'),
}

model DescribeInstanceNewConnectionsResponseBody = {
  instanceNewConnections?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-10-08T02:08:00Z'),
      itemValue?: string(name='ItemValue', description='The number of new connections in the instance.', example='16'),
    }
  ](name='MonitorItem')
  }(name='InstanceNewConnections', description='The list of new connections in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DescribeInstanceNewConnectionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceNewConnectionsResponseBody(name='body'),
}

/**
 * @summary Queries the number of new connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceNewConnectionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceNewConnectionsResponse
 */
async function describeInstanceNewConnectionsWithOptions(request: DescribeInstanceNewConnectionsRequest, runtime: Util.RuntimeOptions): DescribeInstanceNewConnectionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sbcName)) {
    query['SbcName'] = request.sbcName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceNewConnections',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of new connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceNewConnectionsRequest
 * @return DescribeInstanceNewConnectionsResponse
 */
async function describeInstanceNewConnections(request: DescribeInstanceNewConnectionsRequest): DescribeInstanceNewConnectionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceNewConnectionsWithOptions(request, runtime);
}

model DescribeInstancePacketsRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-05-24T10:14:53Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-2r426lavr001'),
  sbcName?: string(name='SbcName', description='The statistical metric. Valid values:

*   Maximum
*   Minimum
*   Average

This parameter is required.', example='Maximum'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-05-18T01:14:26Z'),
}

model DescribeInstancePacketsResponseBody = {
  instancePackets?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   InstancePacketRX: inbound data packets
*   InstancePacketTX: outbound data packets', example='InstancePacketRX'),
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-05-24T10:14:53Z'),
      itemValue?: string(name='ItemValue', description='The number of inbound and outbound data packets in the instance.', example='0'),
    }
  ](name='MonitorItem')
  }(name='InstancePackets', description='The list of inbound and outbound data packets in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DescribeInstancePacketsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstancePacketsResponseBody(name='body'),
}

/**
 * @summary Queries the numbers of inbound and outbound packets of a dedicated instance within a period of time.
 *
 * @param request DescribeInstancePacketsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstancePacketsResponse
 */
async function describeInstancePacketsWithOptions(request: DescribeInstancePacketsRequest, runtime: Util.RuntimeOptions): DescribeInstancePacketsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sbcName)) {
    query['SbcName'] = request.sbcName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstancePackets',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the numbers of inbound and outbound packets of a dedicated instance within a period of time.
 *
 * @param request DescribeInstancePacketsRequest
 * @return DescribeInstancePacketsResponse
 */
async function describeInstancePackets(request: DescribeInstancePacketsRequest): DescribeInstancePacketsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstancePacketsWithOptions(request, runtime);
}

model DescribeInstanceQpsRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-03-29T06:25:00Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-bj-6c219f1fd5d4'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API is requested. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-02-10T06:03:47Z'),
}

model DescribeInstanceQpsResponseBody = {
  instanceQps?: {
    monitorItem?: [ 
    {
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-03-29T06:25:00Z'),
      itemValue?: string(name='ItemValue', description='The number of requests sent to the APIs in the instance.', example='500'),
    }
  ](name='MonitorItem')
  }(name='InstanceQps', description='The list of requests sent to the APIs in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DescribeInstanceQpsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceQpsResponseBody(name='body'),
}

/**
 * @summary Queries the number of requests to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceQpsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceQpsResponse
 */
async function describeInstanceQpsWithOptions(request: DescribeInstanceQpsRequest, runtime: Util.RuntimeOptions): DescribeInstanceQpsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceQps',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of requests to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceQpsRequest
 * @return DescribeInstanceQpsResponse
 */
async function describeInstanceQps(request: DescribeInstanceQpsRequest): DescribeInstanceQpsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceQpsWithOptions(request, runtime);
}

model DescribeInstanceSlbConnectRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-09-15T15:07:06Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-sz-1574cc7c5a31'),
  sbcName?: string(name='SbcName', description='The statistical metric. Valid values:

*   Maximum
*   Minimum
*   Average

This parameter is required.', example='Maximum'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-09-01T02:09:33Z'),
}

model DescribeInstanceSlbConnectResponseBody = {
  instanceSlbConnect?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   InstanceMaxConnection: the maximum number of connections
*   InstanceInactiveConnection: the number of inactive connections
*   InstanceActiveConnection: the number of active connections', example='InstanceActiveConnection'),
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-09-15T15:07:06Z'),
      itemValue?: string(name='ItemValue', description='The number of concurrent connections in the instance.', example='12'),
    }
  ](name='MonitorItem')
  }(name='InstanceSlbConnect', description='The list of concurrent connections in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E7FE7172-AA75-5880-B6F7-C00893E9BC06'),
}

model DescribeInstanceSlbConnectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceSlbConnectResponseBody(name='body'),
}

/**
 * @summary Queries the number of concurrent connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceSlbConnectRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceSlbConnectResponse
 */
async function describeInstanceSlbConnectWithOptions(request: DescribeInstanceSlbConnectRequest, runtime: Util.RuntimeOptions): DescribeInstanceSlbConnectResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sbcName)) {
    query['SbcName'] = request.sbcName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceSlbConnect',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of concurrent connections to a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceSlbConnectRequest
 * @return DescribeInstanceSlbConnectResponse
 */
async function describeInstanceSlbConnect(request: DescribeInstanceSlbConnectRequest): DescribeInstanceSlbConnectResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceSlbConnectWithOptions(request, runtime);
}

model DescribeInstanceTrafficRequest {
  endTime?: string(name='EndTime', description='The end time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-04-01T06:34:03Z'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-2r426lavr001'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API runs. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST: the test environment**

This parameter is required.', example='RELEASE'),
  startTime?: string(name='StartTime', description='The start time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ

This parameter is required.', example='2022-03-31T03:42:00Z'),
}

model DescribeInstanceTrafficResponseBody = {
  instanceTraffic?: {
    monitorItem?: [ 
    {
      item?: string(name='Item', description='The metric. Valid values:

*   inbound: traffic consumed by requests
*   outbound: traffic consumed by responses', example='inbound'),
      itemTime?: string(name='ItemTime', description='The monitoring time. The time follows the ISO 8601 standard and UTC time is used. Format: YYYY-MM-DDThh:mm:ssZ', example='2022-04-01T06:34:03Z'),
      itemValue?: string(name='ItemValue', description='The amount of traffic consumed by the requests and responses in the instance.', example='10'),
    }
  ](name='MonitorItem')
  }(name='InstanceTraffic', description='The traffic consumed by the requests and responses in the instance.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model DescribeInstanceTrafficResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceTrafficResponseBody(name='body'),
}

/**
 * @summary Queries the request traffic and response traffic of a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceTrafficRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceTrafficResponse
 */
async function describeInstanceTrafficWithOptions(request: DescribeInstanceTrafficRequest, runtime: Util.RuntimeOptions): DescribeInstanceTrafficResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceTraffic',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the request traffic and response traffic of a dedicated instance within a period of time.
 *
 * @param request DescribeInstanceTrafficRequest
 * @return DescribeInstanceTrafficResponse
 */
async function describeInstanceTraffic(request: DescribeInstanceTrafficRequest): DescribeInstanceTrafficResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceTrafficWithOptions(request, runtime);
}

model DescribeInstancesRequest {
  enableTagAuthorization?: boolean(name='EnableTagAuthorization', description='Specifies whether tag authorization is enabled.', example='false'),
  instanceId?: string(name='InstanceId', description='The instance ID. If you do not specify this parameter, all instances are returned.', example='api-shared-vpc-001'),
  language?: string(name='Language', description='The language in which you want the description of the system policy to be returned. Valid values:

*   en: English
*   zh: Chinese
*   ja: Japanese', example='zh'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='key1'),
      value?: string(name='Value', description='The tag value.', example='value'),
    }
  ](name='Tag', description='The tag that is bound to the instance.'),
}

model DescribeInstancesResponseBody = {
  instances?: {
    instanceAttribute?: [ 
    {
      aclId?: string(name='AclId', description='The ACL ID.', example='acl-uf6f9zfxfxtp5j9ng3yv4'),
      aclName?: string(name='AclName', description='The name of the access control list (ACL).', example='test'),
      aclStatus?: string(name='AclStatus', description='Indicates whether the ACL is enabled. Valid values:

*   **on**
*   **off**', example='on'),
      aclType?: string(name='AclType', description='The ACL type. Valid values:

*   black: blacklist
*   white: whitelist', example='white'),
      classicEgressAddress?: string(name='ClassicEgressAddress', description='The egress IP address.', example='10.0.0.1'),
      connectCidrBlocks?: string(name='ConnectCidrBlocks', description='The internal CIDR block of the user\\\\"s VPC that can be accessed if the instance is a VPC integration instance.', example='[\\\\"172.16.0.0/24\\\\",\\\\"172.16.1.0/24\\\\"]'),
      connectVpcId?: string(name='ConnectVpcId', description='The ID of the user\\\\"s VPC if the instance is a VPC integration instance.', example='vpc-m5eo7khlb4h4f8y9egsdg'),
      createdTime?: string(name='CreatedTime', description='The time when the instance was created.', example='2021-10-22 15:36:53.0'),
      dedicatedInstanceType?: string(name='DedicatedInstanceType', description='The type of the dedicated instance. Valid values:

*   vpc_connect: VPC integration instance
*   normal: conventional dedicated instance', example='vpc_connect'),
      egressIpv6Enable?: boolean(name='EgressIpv6Enable', description='Indicates whether outbound IPv6 traffic is supported.', example='true'),
      expiredTime?: string(name='ExpiredTime', description='The time when the instance expires.', example='1659801600000'),
      httpsPolicies?: string(name='HttpsPolicies', description='The HTTPS security policy.', example='HTTPS2_TLS1_2'),
      IPV6AclId?: string(name='IPV6AclId', description='The ID of the IPv6 ACL.', example='acl-124resFfs235'),
      IPV6AclName?: string(name='IPV6AclName', description='The name of the IPv6 ACL.', example='testIPV6'),
      IPV6AclStatus?: string(name='IPV6AclStatus', description='Indicates whether the IPv6 ACL is enabled. Valid values:

*   **on**
*   **off**', example='on'),
      IPV6AclType?: string(name='IPV6AclType', description='The type of the IPv6 ACL. Valid values:

*   black: blacklist
*   white: whitelist', example='black'),
      instanceChargeType?: string(name='InstanceChargeType', description='The billing method of the instance. Valid values:

*   PrePaid: subscription
*   PayAsYouGo: pay-as-you-go', example='PrePaid'),
      instanceCidrBlock?: string(name='InstanceCidrBlock', description='The CIDR block of the dedicated instance.

*   172.16.0.0/12
*   192.168.0.0/16', example='192.168.0.0/16'),
      instanceClusterId?: string(name='InstanceClusterId', description='The ID of the cluster to which the dedicated instance cluster belongs.', example='apigateway-cluster-sh-1523cafbgffd'),
      instanceId?: string(name='InstanceId', description='The instance ID.', example='api-shared-vpc-020'),
      instanceName?: string(name='InstanceName', description='The instance name.', example='test'),
      instanceRpsLimit?: int32(name='InstanceRpsLimit', description='The requests per second (RPS) limit on the instance.', example='500'),
      instanceSpec?: string(name='InstanceSpec', description='The instance specification.', example='api.s1.small'),
      instanceSpecAttributes?: {
        specAttribute?: [ 
        {
          localName?: string(name='LocalName', description='The variable name.', example='SLA'),
          value?: string(name='Value', description='The variable value.', example='99.95%'),
        }
      ](name='SpecAttribute')
      }(name='InstanceSpecAttributes', description='The instance specification details.'),
      instanceType?: string(name='InstanceType', description='The instance type. Valid values:

*   VPC_SHARED: shared instance (VPC)
*   VPC_DEDICATED: dedicated instance (VPC)', example='VPC_SHARED'),
      internetEgressAddress?: string(name='InternetEgressAddress', description='The outbound public IP address.', example='47.241.89.244'),
      intranetSegments?: string(name='IntranetSegments', description='The internal CIDR block that is allowed to access the API Gateway instance.', example='[\\\\"172.36.0.0/16\\\\",\\\\"172.31.16.0/20\\\\"]'),
      maintainEndTime?: string(name='MaintainEndTime', description='The end time of the maintenance window. The time is in the *HH:mm*Z format. The time is displayed in UTC.', example='01:00Z'),
      maintainStartTime?: string(name='MaintainStartTime', description='The start time of the maintenance window. The time is in the *HH:mm*Z format. The time is displayed in UTC.', example='22:00Z'),
      networkInterfaceAttributes?: {
        networkInterfaceAttribute?: [ 
        {
          cidrBlock?: string(name='CidrBlock', description='The CIDR block of the vSwitch.', example='192.168.17.0/24'),
          securityGroupId?: string(name='SecurityGroupId', description='The security group ID. Services in the same security group can access each other.', example='sg-2zeehz13zcyj1kfk3o85'),
          vswitchId?: string(name='VswitchId', description='The vSwitch ID.', example='vsw-2zeqals6rbj51bhjn8b89'),
          zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-shenzhen-d'),
        }
      ](name='NetworkInterfaceAttribute')
      }(name='NetworkInterfaceAttributes', description='The network information of the user\\\\"s VPC if the instance is a VPC integration instance.'),
      newVpcEgressAddress?: string(name='NewVpcEgressAddress', description='The new VPC egress CIDR block.', example='100.104.253.0/26'),
      privateDnsList?: {
        privateDns?: [ string ](name='PrivateDns')
      }(name='PrivateDnsList', description='The private DNS list.'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-beijing'),
      status?: string(name='Status', description='The instance status.', example='RUNNING'),
      supportIpv6?: boolean(name='SupportIpv6', description='Indicates whether IPv6 traffic is supported.', example='true'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The tag key of the instance.', example='Cookie'),
          value?: string(name='Value', description='The tag value of the instance.', example='240'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The tags of the instance.'),
      userVpcId?: string(name='UserVpcId', description='The user VPC ID.', example='vpc-t***hx****yu9****t0g4'),
      userVswitchId?: string(name='UserVswitchId', description='The user vSwitch ID.', example='vsw-t4***eh****d7q****i2f'),
      vpcEgressAddress?: string(name='VpcEgressAddress', description='The VPC egress CIDR block.', example='100.104.254.0/26'),
      vpcIntranetEnable?: boolean(name='VpcIntranetEnable', description='Indicates whether VPC access is enabled.', example='true'),
      vpcOwnerId?: long(name='VpcOwnerId', description='The ID of the account to which the VPC-based instance belongs.', example='1408453217640291****'),
      vpcSlbIntranetEnable?: boolean(name='VpcSlbIntranetEnable', description='Indicates whether virtual private cloud (VPC) Server Load Balancer (SLB) is enabled.', example='true'),
      zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-hangzhou-MAZ5(g,h)'),
      zoneLocalName?: string(name='ZoneLocalName', description='The zone.', example='Multi-Availability Zone 3(b,c,a)'),
    }
  ](name='InstanceAttribute')
  }(name='Instances', description='The information about the instances.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
  totalCount?: int32(name='TotalCount', description='The total number of entries.', example='1'),
}

model DescribeInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstancesResponseBody(name='body'),
}

/**
 * @summary Queries the details of instances in a region. The instances include shared instances and dedicated instances.
 *
 * @param request DescribeInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstancesResponse
 */
async function describeInstancesWithOptions(request: DescribeInstancesRequest, runtime: Util.RuntimeOptions): DescribeInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.enableTagAuthorization)) {
    query['EnableTagAuthorization'] = request.enableTagAuthorization;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstances',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the details of instances in a region. The instances include shared instances and dedicated instances.
 *
 * @param request DescribeInstancesRequest
 * @return DescribeInstancesResponse
 */
async function describeInstances(request: DescribeInstancesRequest): DescribeInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstancesWithOptions(request, runtime);
}

model DescribeIpControlPolicyItemsRequest {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Maximum value: 100. Default value: 10.', example='10'),
  policyItemId?: string(name='PolicyItemId', description='The ID of the policy.', example='P151617000829241'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeIpControlPolicyItemsResponseBody = {
  ipControlPolicyItems?: {
    ipControlPolicyItem?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='11112'),
      cidrIp?: string(name='CidrIp', description='The IP addresses or CIDR blocks.', example='113.125.XX.XX;101.11.XX.XX'),
      createTime?: string(name='CreateTime', description='The time when the policy was created. The time is displayed in UTC.', example='2018-01-17T06:20:08Z'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the policy was modified. The time is displayed in UTC.', example='2018-01-17T06:25:13Z'),
      policyItemId?: string(name='PolicyItemId', description='The ID of the policy.', example='P151617000829241'),
    }
  ](name='IpControlPolicyItem')
  }(name='IpControlPolicyItems', description='The information about policies. The information is an array of IpControlPolicyItem data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='2'),
}

model DescribeIpControlPolicyItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeIpControlPolicyItemsResponseBody(name='body'),
}

/**
 * @summary Queries the rule entries of an IP address-based traffic control policy.
 *
 * @description *   This operation is intended for API providers.
 * *   You can filter the query results by policy ID.
 *
 * @param request DescribeIpControlPolicyItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeIpControlPolicyItemsResponse
 */
async function describeIpControlPolicyItemsWithOptions(request: DescribeIpControlPolicyItemsRequest, runtime: Util.RuntimeOptions): DescribeIpControlPolicyItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.policyItemId)) {
    query['PolicyItemId'] = request.policyItemId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIpControlPolicyItems',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the rule entries of an IP address-based traffic control policy.
 *
 * @description *   This operation is intended for API providers.
 * *   You can filter the query results by policy ID.
 *
 * @param request DescribeIpControlPolicyItemsRequest
 * @return DescribeIpControlPolicyItemsResponse
 */
async function describeIpControlPolicyItems(request: DescribeIpControlPolicyItemsRequest): DescribeIpControlPolicyItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpControlPolicyItemsWithOptions(request, runtime);
}

model DescribeIpControlsRequest {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  ipControlName?: string(name='IpControlName', description='The name of the ACL.', example='ACL test'),
  ipControlType?: string(name='IpControlType', description='The type of the ACL. Valid values:

*   **ALLOW**: a whitelist
*   **REFUSE**: a blacklist', example='ALLOW'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeIpControlsResponseBody = {
  ipControlInfos?: {
    ipControlInfo?: [ 
    {
      createTime?: string(name='CreateTime', description='The time when the ACL was created. The time is displayed in UTC.', example='2018-01-17T05:48:11Z'),
      description?: string(name='Description', description='The description of the ACL.', example='description'),
      ipControlId?: string(name='IpControlId', description='The ID of the ACL.', example='7ea91319a34d48a09b5c9c871d9768b1'),
      ipControlName?: string(name='IpControlName', description='The name of the ACL.', example='testControl11'),
      ipControlType?: string(name='IpControlType', description='The type of the ACL.', example='ALLOW'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the ACL was modified. The time is displayed in UTC.', example='2018-01-17T06:00:38Z'),
      regionId?: string(name='RegionId', description='The ID of the region in which the ACL is deployed.', example='cn-qingdao'),
    }
  ](name='IpControlInfo')
  }(name='IpControlInfos', description='The information about the ACL. The information is an array that consists of IpControlInfo data. The information does not include specific policies.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribeIpControlsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeIpControlsResponseBody(name='body'),
}

/**
 * @summary Queries custom access control lists (ACLs) on separate pages.
 *
 * @description *   This operation is intended for API providers.
 * *   This operation is used to query the ACLs in a region. Region is a system parameter.
 * *   You can filter the query results by ACL ID, name, or type.
 * *   This operation cannot be used to query specific policies. If you want to query specific policies, call the [DescribeIpControlPolicyItems](~~DescribeIpControlPolicyItems~~) operation.
 *
 * @param request DescribeIpControlsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeIpControlsResponse
 */
async function describeIpControlsWithOptions(request: DescribeIpControlsRequest, runtime: Util.RuntimeOptions): DescribeIpControlsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.ipControlName)) {
    query['IpControlName'] = request.ipControlName;
  }
  if (!Util.isUnset(request.ipControlType)) {
    query['IpControlType'] = request.ipControlType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIpControls',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries custom access control lists (ACLs) on separate pages.
 *
 * @description *   This operation is intended for API providers.
 * *   This operation is used to query the ACLs in a region. Region is a system parameter.
 * *   You can filter the query results by ACL ID, name, or type.
 * *   This operation cannot be used to query specific policies. If you want to query specific policies, call the [DescribeIpControlPolicyItems](~~DescribeIpControlPolicyItems~~) operation.
 *
 * @param request DescribeIpControlsRequest
 * @return DescribeIpControlsResponse
 */
async function describeIpControls(request: DescribeIpControlsRequest): DescribeIpControlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpControlsWithOptions(request, runtime);
}

model DescribeLogConfigRequest {
  logType?: string(name='LogType', description='The log type.

Valid values:

*   PROVIDER', example='PROVIDER'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLogConfigResponseBody = {
  logInfos?: {
    logInfo?: [ 
    {
      logType?: string(name='LogType', description='The log type.', example='PROVIDER'),
      regionId?: string(name='RegionId', description='The region ID of the Logstore.', example='cn-hangzhou'),
      slsLogStore?: string(name='SlsLogStore', description='The name of the Logstore in Log Service.', example='slsstore'),
      slsProject?: string(name='SlsProject', description='The name of the Log Service project.', example='slsproject'),
    }
  ](name='LogInfo')
  }(name='LogInfos', description='Info of the log config.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E3BC2706-ABDB-5B64-A12F-08DFD9E3F339'),
}

model DescribeLogConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLogConfigResponseBody(name='body'),
}

/**
 * @summary 查询日志配置
 *
 * @param request DescribeLogConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLogConfigResponse
 */
async function describeLogConfigWithOptions(request: DescribeLogConfigRequest, runtime: Util.RuntimeOptions): DescribeLogConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLogConfig',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询日志配置
 *
 * @param request DescribeLogConfigRequest
 * @return DescribeLogConfigResponse
 */
async function describeLogConfig(request: DescribeLogConfigRequest): DescribeLogConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLogConfigWithOptions(request, runtime);
}

model DescribeMarketRemainsQuotaRequest {
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='*.demo.com'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeMarketRemainsQuotaResponseBody = {
  remainsQuota?: long(name='RemainsQuota', description='The remaining quota.', example='1000'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E7FE7172-AA75-5880-B6F7-C00893E9BC06'),
}

model DescribeMarketRemainsQuotaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMarketRemainsQuotaResponseBody(name='body'),
}

/**
 * @summary Queries the number of remaining ordered relationships for a purchaser.
 *
 * @param request DescribeMarketRemainsQuotaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMarketRemainsQuotaResponse
 */
async function describeMarketRemainsQuotaWithOptions(request: DescribeMarketRemainsQuotaRequest, runtime: Util.RuntimeOptions): DescribeMarketRemainsQuotaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMarketRemainsQuota',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of remaining ordered relationships for a purchaser.
 *
 * @param request DescribeMarketRemainsQuotaRequest
 * @return DescribeMarketRemainsQuotaResponse
 */
async function describeMarketRemainsQuota(request: DescribeMarketRemainsQuotaRequest): DescribeMarketRemainsQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMarketRemainsQuotaWithOptions(request, runtime);
}

model DescribeModelsRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='30e792398d6c4569b04c0e53a3494381'),
  modelId?: string(name='ModelId', description='The ID of the model.', example='123'),
  modelName?: string(name='ModelName', description='The name of the model.', example='Test'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='key'),
      value?: string(name='Value', description='The tag value.', example='value'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
}

model DescribeModelsResponseBody = {
  modelDetails?: {
    modelDetail?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the model was created.', example='2019-01-29T11:07:48Z'),
      description?: string(name='Description', description='The description of the model definition.', example='Model Description'),
      groupId?: string(name='GroupId', description='The ID of the API group to which the model belongs.', example='30e792398d6c4569b04c0e53a3494381'),
      modelId?: string(name='ModelId', description='The ID of the model.', example='766c0b9538a04bdf974953b5576783ba'),
      modelName?: string(name='ModelName', description='The name of the model.', example='Test'),
      modelRef?: string(name='ModelRef', description='The URI of the model.', example='https://apigateway.aliyun.com/models/30e792398d6c4569b04c0e53a3494381/766c0b9538a04bdf974953b5576783ba'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the model was last modified.', example='2019-01-29T11:07:48Z'),
      schema?: string(name='Schema', description='The definition of the model.', example='{\\\\"type\\\\":\\\\"object\\\\",\\\\"properties\\\\":{\\\\"id\\\\":{\\\\"format\\\\":\\\\"int64\\\\",\\\\"maximum\\\\":100,\\\\"exclusiveMaximum\\\\":true,\\\\"type\\\\":\\\\"integer\\\\"},\\\\"name\\\\":{\\\\"maxLength\\\\":10,\\\\"type\\\\":\\\\"string\\\\"}}}'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The tag key.', example='ENV'),
          value?: string(name='Value', description='The tag value.', example='ST4'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The tags of the model.'),
    }
  ](name='ModelDetail')
  }(name='ModelDetails', description='The returned information about models. It is an array consisting of ModelDetail data.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='40306469-2FB5-417A-B723-AF1F4A4FA204'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribeModelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeModelsResponseBody(name='body'),
}

/**
 * @summary Queries the created models of an API group.
 *
 * @description *   Fuzzy queries are supported.
 *
 * @param request DescribeModelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeModelsResponse
 */
async function describeModelsWithOptions(request: DescribeModelsRequest, runtime: Util.RuntimeOptions): DescribeModelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.modelId)) {
    query['ModelId'] = request.modelId;
  }
  if (!Util.isUnset(request.modelName)) {
    query['ModelName'] = request.modelName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeModels',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the created models of an API group.
 *
 * @description *   Fuzzy queries are supported.
 *
 * @param request DescribeModelsRequest
 * @return DescribeModelsResponse
 */
async function describeModels(request: DescribeModelsRequest): DescribeModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeModelsWithOptions(request, runtime);
}

model DescribePluginApisRequest {
  apiId?: string(name='ApiId', description='The ID of the API.', example='c6b0dd188b0e4e408e12f926********'),
  apiName?: string(name='ApiName', description='The name of the API.', example='API'),
  description?: string(name='Description', description='The description of the API.', example='API description'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='231a4bb81ee94da785733c29********'),
  method?: string(name='Method', description='The request HTTP method of the API.', example='GET'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.
Default value:10.', example='10'),
  path?: string(name='Path', description='The request path of the API.', example='/sendVerifyCode'),
  pluginId?: string(name='PluginId', description='The ID of the gateway plug-in.

This parameter is required.', example='bf6583efcef44c51adb00c4e********'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePluginApisResponseBody = {
  apiSummarys?: {
    apiPluginSummary?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='accc8c68b7294b1cb4928741********'),
      apiName?: string(name='ApiName', description='The API name.', example='fhosQueryDayOfStock_V2'),
      description?: string(name='Description', description='The API description.', example='API description'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='5f51f89261854fd9ad5116be********'),
      groupName?: string(name='GroupName', description='The API group to which the API belongs.', example='myGroup2'),
      method?: string(name='Method', description='The HTTP method of the API.', example='GET'),
      path?: string(name='Path', description='The request path of the API.', example='/mqTest'),
      regionId?: string(name='RegionId', description='The ID of the region in which the API resides.', example='cn-shanghai'),
      stageAlias?: string(name='StageAlias', description='The environment alias.', example='Production'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment', example='RELEASE'),
    }
  ](name='ApiPluginSummary')
  }(name='ApiSummarys', description='The information about APIs.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='F9C5C4A5-BC6C-57A3-839F-AB08********'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='7'),
}

model DescribePluginApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginApisResponseBody(name='body'),
}

/**
 * @summary Queries the APIs to which a specified plug-in is bound.
 *
 * @param request DescribePluginApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginApisResponse
 */
async function describePluginApisWithOptions(request: DescribePluginApisRequest, runtime: Util.RuntimeOptions): DescribePluginApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.method)) {
    query['Method'] = request.method;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the APIs to which a specified plug-in is bound.
 *
 * @param request DescribePluginApisRequest
 * @return DescribePluginApisResponse
 */
async function describePluginApis(request: DescribePluginApisRequest): DescribePluginApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginApisWithOptions(request, runtime);
}

model DescribePluginGroupsRequest {
  description?: string(name='Description', description='API group description', example='test'),
  groupId?: string(name='GroupId', description='API group ID', example='8cc2a3cbe3394524b6e71be5db9b02a3'),
  groupName?: string(name='GroupName', description='API group name', example='crm_custom_service'),
  pageNumber?: int32(name='PageNumber', description='Pagination parameter: current page number', example='1'),
  pageSize?: int32(name='PageSize', description='Pagination parameter: number of items per page', example='10'),
  pluginId?: string(name='PluginId', description='API Gateway plugin ID

This parameter is required.', example='1f3bde29b43d4d53989248327ff737f2'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePluginGroupsResponseBody = {
  groupSummarys?: {
    groupPluginSummary?: [ 
    {
      basePath?: string(name='BasePath', description='API root path', example='/rpew'),
      description?: string(name='Description', description='Description', example='test'),
      groupId?: string(name='GroupId', description='API group ID', example='4ed31575e2de43de8c51eb1217a1f56b'),
      groupName?: string(name='GroupName', description='API group name', example='ECP_API'),
      regionId?: string(name='RegionId', description='Region ID where the API group is located', example='cn-beijing'),
      stageAlias?: string(name='StageAlias', description='Stage name Alias', example='DEV'),
      stageName?: string(name='StageName', description='Environment name, possible values:

- **RELEASE**: Production
- **PRE**: Pre-release
- **TEST**: Testing', example='RELEASE'),
    }
  ](name='GroupPluginSummary')
  }(name='GroupSummarys', description='Collection of group information'),
  pageNumber?: int32(name='PageNumber', description='Pagination parameter: current page number', example='1'),
  pageSize?: int32(name='PageSize', description='Pagination parameter: number of items per page, default value 10', example='10'),
  requestId?: string(name='RequestId', description='Request ID', example='765BC99E-F583-5A80-9A42-42AC125C2CDC'),
  totalCount?: int32(name='TotalCount', description='Total number of returned results', example='20'),
}

model DescribePluginGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginGroupsResponseBody(name='body'),
}

/**
 * @summary Query the list of groups bound to a plugin based on the plugin ID
 *
 * @param request DescribePluginGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginGroupsResponse
 */
async function describePluginGroupsWithOptions(request: DescribePluginGroupsRequest, runtime: Util.RuntimeOptions): DescribePluginGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginGroups',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Query the list of groups bound to a plugin based on the plugin ID
 *
 * @param request DescribePluginGroupsRequest
 * @return DescribePluginGroupsResponse
 */
async function describePluginGroups(request: DescribePluginGroupsRequest): DescribePluginGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginGroupsWithOptions(request, runtime);
}

model DescribePluginSchemasRequest {
  language?: string(name='Language', example='en'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePluginSchemasResponseBody = {
  pluginSchemas?: {
    pluginSchema?: [ 
    {
      description?: string(name='Description', example='plugin scheme description'),
      documentId?: string(name='DocumentId', example='4107**'),
      name?: string(name='Name', example='VPC_C'),
      supportClassic?: boolean(name='SupportClassic', example='true'),
      title?: string(name='Title', example='plugin schema title'),
    }
  ](name='PluginSchema')
  }(name='PluginSchemas'),
  requestId?: string(name='RequestId', example='2D39D1B3-8548-508A-9CE2-7F4A3F2A7989'),
}

model DescribePluginSchemasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginSchemasResponseBody(name='body'),
}

/**
 * @summary 查询插件列表
 *
 * @param request DescribePluginSchemasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginSchemasResponse
 */
async function describePluginSchemasWithOptions(request: DescribePluginSchemasRequest, runtime: Util.RuntimeOptions): DescribePluginSchemasResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginSchemas',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询插件列表
 *
 * @param request DescribePluginSchemasRequest
 * @return DescribePluginSchemasResponse
 */
async function describePluginSchemas(request: DescribePluginSchemasRequest): DescribePluginSchemasResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginSchemasWithOptions(request, runtime);
}

model DescribePluginTemplatesRequest {
  language?: string(name='Language', description='The language that is used to return the description of the system policy. Valid values:

*   en: English
*   zh-CN: Chinese.
*   ja: Japanese', example='zh'),
  pluginName?: string(name='PluginName', description='The name of the plug-in.', example='jwtAuth'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePluginTemplatesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
  templates?: {
    template?: [ 
    {
      description?: string(name='Description', description='The description.', example='balabala'),
      documentAnchor?: string(name='DocumentAnchor', description='The document anchor point.', example='anchor'),
      documentId?: string(name='DocumentId', description='The ID of the document.', example='41079'),
      sample?: string(name='Sample', description='The sample.', example='1'),
      title?: string(name='Title', description='The title of the plug-in template title.', example='template title'),
    }
  ](name='Template')
  }(name='Templates', description='The templates.'),
}

model DescribePluginTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginTemplatesResponseBody(name='body'),
}

/**
 * @summary 查询插件模板
 *
 * @param request DescribePluginTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginTemplatesResponse
 */
async function describePluginTemplatesWithOptions(request: DescribePluginTemplatesRequest, runtime: Util.RuntimeOptions): DescribePluginTemplatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.pluginName)) {
    query['PluginName'] = request.pluginName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginTemplates',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询插件模板
 *
 * @param request DescribePluginTemplatesRequest
 * @return DescribePluginTemplatesResponse
 */
async function describePluginTemplates(request: DescribePluginTemplatesRequest): DescribePluginTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginTemplatesWithOptions(request, runtime);
}

model DescribePluginsRequest {
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Maximum value: 100. Default value: 10.', example='10'),
  pluginId?: string(name='PluginId', description='The ID of the plug-in.', example='a96926e82f994915a8da40a119374537'),
  pluginName?: string(name='PluginName', description='The name of the plug-in.', example='testPlugin'),
  pluginType?: string(name='PluginType', description='The business type of the plug-in.', example='cors'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

N can be an integer from 1 to 20.``', example='env'),
      value?: string(name='Value', description='The value of the tag.

N can be an integer from 1 to 20.``', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the lifecycle rule. You can specify multiple tags.', example='Key， Value'),
}

model DescribePluginsResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  plugins?: {
    pluginAttribute?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the plug-in.', example='2019-01-11T09:29:58Z'),
      description?: string(name='Description', description='The plug-in description.', example='Throttling'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the plug-in.', example='2019-01-11T09:29:58Z'),
      pluginData?: string(name='PluginData', description='The definition statement of the plug-in.', example='{"unit":"MINUTE","apiDefault":20}'),
      pluginId?: string(name='PluginId', description='The ID of the plug-in.', example='9a3f1a5279434f2ba74ccd91c295af9f'),
      pluginName?: string(name='PluginName', description='The name of the plug-in.', example='firstPlugin'),
      pluginType?: string(name='PluginType', description='The type of the plug-in.', example='trafficControl'),
      regionId?: string(name='RegionId', description='The region where the plug-in is located.', example='cn-qingdao'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The key of the tag.', example='testkey'),
          value?: string(name='Value', description='The value of the tag.', example='tetstvalue'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The tags.'),
    }
  ](name='PluginAttribute')
  }(name='Plugins', description='The returned information about the plug-in. It is an array consisting of PluginAttribute data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='46373DC4-19F1-4DC8-8C31-1107289BB5E0'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribePluginsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginsResponseBody(name='body'),
}

/**
 * @summary Queries API Gateway plug-ins and the details of the plug-ins.
 *
 * @description *   This operation supports pagination.
 * *   This operation allows you to query plug-ins by business type.
 * *   This operation allows you to query plug-ins by ID.
 * *   This operation allows you to query plug-ins by name.
 *
 * @param request DescribePluginsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginsResponse
 */
async function describePluginsWithOptions(request: DescribePluginsRequest, runtime: Util.RuntimeOptions): DescribePluginsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.pluginName)) {
    query['PluginName'] = request.pluginName;
  }
  if (!Util.isUnset(request.pluginType)) {
    query['PluginType'] = request.pluginType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePlugins',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries API Gateway plug-ins and the details of the plug-ins.
 *
 * @description *   This operation supports pagination.
 * *   This operation allows you to query plug-ins by business type.
 * *   This operation allows you to query plug-ins by ID.
 * *   This operation allows you to query plug-ins by name.
 *
 * @param request DescribePluginsRequest
 * @return DescribePluginsResponse
 */
async function describePlugins(request: DescribePluginsRequest): DescribePluginsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginsWithOptions(request, runtime);
}

model DescribePluginsByApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='93f4ead4080c4b2da70b7f81f50ae459'),
  groupId?: string(name='GroupId', description='The ID of the group to which the API belongs.

This parameter is required.', example='3c7a38392e764718ad7673e7b7f535d4'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment in which the API is running. Valid values:

*   **RELEASE**: production
*   **PRE**: staging
*   **TEST**: test

This parameter is required.', example='RELEASE'),
}

model DescribePluginsByApiResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  plugins?: {
    pluginAttribute?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the plug-in was created. The time is displayed in UTC.', example='2019-01-11T09:29:58Z'),
      description?: string(name='Description', description='The plug-in description.', example='Traffic throttling'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the plug-in was last modified. The time is displayed in UTC.', example='2019-01-11T09:29:58Z'),
      pluginData?: string(name='PluginData', description='The definition statement of the plug-in.', example='{\\\\"unit\\\\":\\\\"MINUTE\\\\",\\\\"apiDefault\\\\":20}'),
      pluginId?: string(name='PluginId', description='The plug-in ID.', example='9a3f1a5279434f2ba74ccd91c295af9f'),
      pluginName?: string(name='PluginName', description='The plug-in name.', example='firstPlugin'),
      pluginType?: string(name='PluginType', description='The plug-in type.', example='trafficControl'),
      regionId?: string(name='RegionId', description='The region where the plug-in resides.', example='cn-qingdao'),
    }
  ](name='PluginAttribute')
  }(name='Plugins', description='The plug-in information. The information is an array that consists of PluginAttribute data.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='46373DC4-19F1-4DC8-8C31-1107289BB5E0'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
}

model DescribePluginsByApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginsByApiResponseBody(name='body'),
}

/**
 * @summary Queries the plug-ins that are bound to a running API in an environment.
 *
 * @description *   This operation is intended for API callers.
 * *   This operation supports pagination.
 *
 * @param request DescribePluginsByApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginsByApiResponse
 */
async function describePluginsByApiWithOptions(request: DescribePluginsByApiRequest, runtime: Util.RuntimeOptions): DescribePluginsByApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginsByApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the plug-ins that are bound to a running API in an environment.
 *
 * @description *   This operation is intended for API callers.
 * *   This operation supports pagination.
 *
 * @param request DescribePluginsByApiRequest
 * @return DescribePluginsByApiResponse
 */
async function describePluginsByApi(request: DescribePluginsByApiRequest): DescribePluginsByApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginsByApiWithOptions(request, runtime);
}

model DescribePluginsByGroupRequest {
  groupId?: string(name='GroupId', description='Group ID

This parameter is required.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  pageNumber?: int32(name='PageNumber', description='Pagination parameter: current page number', example='1'),
  pageSize?: int32(name='PageSize', description='Pagination parameter: number of items per page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='Specifies the environment of the API to operate on.

- **RELEASE**: Production
- **PRE**: Pre-release
- **TEST**: Test

This parameter is required.', example='RELEASE'),
}

model DescribePluginsByGroupResponseBody = {
  pageNumber?: int32(name='PageNumber', description='Pagination parameter: current page number', example='1'),
  pageSize?: int32(name='PageSize', description='Pagination parameter: number of items per page.', example='10'),
  plugins?: {
    pluginAttribute?: [ 
    {
      createdTime?: string(name='CreatedTime', description='Creation time, in GMT', example='2024-12-20T02:05:57Z'),
      description?: string(name='Description', description='Plugin description', example='traffic controll'),
      modifiedTime?: string(name='ModifiedTime', description='Last modified time, in GMT', example='2022-03-15T02:30:18Z'),
      pluginData?: string(name='PluginData', description='Plugin definition statement', example='{\\\\"unit\\\\":\\\\"MINUTE\\\\",\\\\"apiDefault\\\\":20}'),
      pluginId?: string(name='PluginId', description='Plugin ID', example='5e204eeb4aa94c919a49f471ad3fc716'),
      pluginName?: string(name='PluginName', description='Plugin name', example='firstPlugin'),
      pluginType?: string(name='PluginType', description='Plugin type', example='trafficControl'),
      regionId?: string(name='RegionId', description='插件所在Region', example='cn-hangzhou'),
    }
  ](name='PluginAttribute')
  }(name='Plugins', description='Returns information about the plugins'),
  requestId?: string(name='RequestId', description='Request ID', example='5F5574BA-F22B-563D-841E-C817964F517F'),
  totalCount?: int32(name='TotalCount', description='Total number of results returned', example='32'),
}

model DescribePluginsByGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePluginsByGroupResponseBody(name='body'),
}

/**
 * @summary Query Plugins Bound to API Group
 *
 * @param request DescribePluginsByGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePluginsByGroupResponse
 */
async function describePluginsByGroupWithOptions(request: DescribePluginsByGroupRequest, runtime: Util.RuntimeOptions): DescribePluginsByGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePluginsByGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Query Plugins Bound to API Group
 *
 * @param request DescribePluginsByGroupRequest
 * @return DescribePluginsByGroupResponse
 */
async function describePluginsByGroup(request: DescribePluginsByGroupRequest): DescribePluginsByGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePluginsByGroupWithOptions(request, runtime);
}

model DescribePurchasedApiGroupRequest {
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='102b631ae1094e33a77c45312226184e'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePurchasedApiGroupResponseBody = {
  description?: string(name='Description', description='The description of the API group.', example='api group description'),
  domains?: {
    domainItem?: [ 
    {
      domainName?: string(name='DomainName', description='The domain name.', example='test_domain.com'),
    }
  ](name='DomainItem')
  }(name='Domains', description='The list of domain names.'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='48977d7b96074966a7c9c2a8872d7e06'),
  groupName?: string(name='GroupName', description='The name of the API group.', example='Weather'),
  purchasedTime?: string(name='PurchasedTime', description='The time when the API group was purchased.', example='2021-12-19T00:00:00'),
  regionId?: string(name='RegionId', description='The region where the API group is located.', example='cn-qingdao'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='61A16D46-EC04-5288-8A18-811B0F536CC2'),
  status?: string(name='Status', description='The status of the API group.

*   **NORMAL**: The API group is normal.
*   **DELETE**: The API group is deleted.', example='NORMAL'),
}

model DescribePurchasedApiGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePurchasedApiGroupResponseBody(name='body'),
}

/**
 * @summary Queries the details about an API group purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApiGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePurchasedApiGroupResponse
 */
async function describePurchasedApiGroupWithOptions(request: DescribePurchasedApiGroupRequest, runtime: Util.RuntimeOptions): DescribePurchasedApiGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePurchasedApiGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the details about an API group purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApiGroupRequest
 * @return DescribePurchasedApiGroupResponse
 */
async function describePurchasedApiGroup(request: DescribePurchasedApiGroupRequest): DescribePurchasedApiGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePurchasedApiGroupWithOptions(request, runtime);
}

model DescribePurchasedApiGroupsRequest {
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='20'),
  securityToken?: string(name='SecurityToken'),
}

model DescribePurchasedApiGroupsResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='20'),
  purchasedApiGroupAttributes?: {
    purchasedApiGroupAttribute?: [ 
    {
      billingType?: string(name='BillingType', description='The billing method.', example='POSTPAID'),
      description?: string(name='Description', description='The description of the API group.', example='1'),
      expireTime?: string(name='ExpireTime', description='The time when the API group expires.', example='2021-12-19T00:00:00'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='8e91f23f88f94348855b82c9a73209f3'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='group1'),
      invokeTimesMax?: long(name='InvokeTimesMax', description='The maximum number of calls.', example='10'),
      invokeTimesNow?: long(name='InvokeTimesNow', description='The current number of calls.', example='10'),
      purchasedTime?: string(name='PurchasedTime', description='The time when the API group was purchased.', example='2021-12-19T00:00:00'),
      regionId?: string(name='RegionId', description='The ID of the region where the API group is located.', example='cn-shanghai'),
      status?: string(name='Status', description='The status of the API group.

*   **NORMAL**: The API group is normal.
*   **DELETE**: The API group is deleted.', example='NORMAL'),
    }
  ](name='PurchasedApiGroupAttribute')
  }(name='PurchasedApiGroupAttributes', description='The attributes of the API group.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='36BBBAD4-1CFB-489F-841A-8CA52EEA787E'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'),
}

model DescribePurchasedApiGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePurchasedApiGroupsResponseBody(name='body'),
}

/**
 * @summary Queries the API groups purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApiGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePurchasedApiGroupsResponse
 */
async function describePurchasedApiGroupsWithOptions(request: DescribePurchasedApiGroupsRequest, runtime: Util.RuntimeOptions): DescribePurchasedApiGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePurchasedApiGroups',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the API groups purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApiGroupsRequest
 * @return DescribePurchasedApiGroupsResponse
 */
async function describePurchasedApiGroups(request: DescribePurchasedApiGroupsRequest): DescribePurchasedApiGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePurchasedApiGroupsWithOptions(request, runtime);
}

model DescribePurchasedApisRequest {
  apiId?: string(name='ApiId', description='The ID of the API.', example='3b81fd160f5645e097cc8855d75a1cf6'),
  apiName?: string(name='ApiName', description='The name of the API.', example='Cz88IpQuery'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='d27ad517be5f4c95ac3631780a8f4d50'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE**
*   **TEST**', example='RELEASE'),
  visibility?: string(name='Visibility', description='Specifies whether the API is public. Valid values:

*   **PUBLIC**: indicates that the API is public. If you set this parameter to PUBLIC, this API is displayed on the API List page in the console for all users after the API is published to the production environment.
*   **PRIVATE**: indicates that the API is private. If you set this parameter to PRIVATE, this API is not displayed in Alibaba Cloud Marketplace after the API group to which this API belongs is made available.', example='PUBLIC'),
}

model DescribePurchasedApisResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='10'),
  purchasedApis?: {
    purchasedApi?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='eb6e54c1576d41149746e8e69b0a0792'),
      apiName?: string(name='ApiName', description='The name of the API.', example='gw_rado_tissot_'),
      deployedTime?: string(name='DeployedTime', description='The deployment time. Format: yyyy-mm-ddhh:mm:ss.', example='2021-06-1113:57:38'),
      description?: string(name='Description', description='The description of the API.', example='test'),
      groupId?: string(name='GroupId', description='The ID of the API group to which the API belongs. This ID is generated by the system and globally unique.', example='3013a55c0c44483f984d26df27120513'),
      groupName?: string(name='GroupName', description='The name of the API group.', example='DMS_DEFAULT_GROUP_408589'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the API.', example='2021-06-11T13:57:38+08:00'),
      purchasedTime?: string(name='PurchasedTime', description='The time when the API was purchased.', example='2021-06-11T13:57:38+08:00'),
      regionId?: string(name='RegionId', description='The ID of the region in which the API is located.', example='cn-hangzhou'),
      stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE**
*   **TEST**', example='TEST'),
      visibility?: string(name='Visibility', description='Indicates whether the API is public. Valid values:

*   **PUBLIC**
*   **PRIVATE**', example='PUBLIC'),
    }
  ](name='PurchasedApi')
  }(name='PurchasedApis', description='The monitoring information about API call delays. The returned information is an array consisting of purchased APIs.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribePurchasedApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePurchasedApisResponseBody(name='body'),
}

/**
 * @summary Queries APIs that are purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePurchasedApisResponse
 */
async function describePurchasedApisWithOptions(request: DescribePurchasedApisRequest, runtime: Util.RuntimeOptions): DescribePurchasedApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.visibility)) {
    query['Visibility'] = request.visibility;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePurchasedApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries APIs that are purchased from Alibaba Cloud Marketplace.
 *
 * @param request DescribePurchasedApisRequest
 * @return DescribePurchasedApisResponse
 */
async function describePurchasedApis(request: DescribePurchasedApisRequest): DescribePurchasedApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePurchasedApisWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  language?: string(name='Language', description='The language in which you want to return the descriptions of the access control policies. Valid values:

*   zh-CN (default value): Chinese
*   en: English
*   ja: Japanese', example='zh'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeRegionsResponseBody = {
  regions?: {
    region?: [ 
    {
      localName?: string(name='LocalName', description='The name of the region.', example='China (Shenzhen)'),
      regionEndpoint?: string(name='RegionEndpoint', description='The endpoint of the service for the region.', example='apigateway.cn-shenzhen.aliyuncs.com'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-shenzhen'),
    }
  ](name='Region')
  }(name='Regions', description='The returned region information. It is an array that consists of Region data.', example='cn-huhehaote'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='36BBBAD4-1CFB-489F-841A-8CA52EEA787E'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @summary Queries the Alibaba Cloud regions that are supported by API Gateway.
 *
 * @description This operation queries regions in which API Gateway is available.
 * *   This operation is intended for API providers and callers.
 *
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Alibaba Cloud regions that are supported by API Gateway.
 *
 * @description This operation queries regions in which API Gateway is available.
 * *   This operation is intended for API providers and callers.
 *
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeSignaturesRequest {
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken'),
  signatureId?: string(name='SignatureId', description='The IDs of the keys to query.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  signatureName?: string(name='SignatureName', description='The names of the keys to query.', example='backendsignature'),
}

model DescribeSignaturesResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  signatureInfos?: {
    signatureInfo?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The creation time of the key.', example='2016-07-23T08:28:48Z'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time of the key.', example='2016-07-24T08:28:48Z'),
      regionId?: string(name='RegionId', description='The region where the key is located.', example='cn-qingdao'),
      signatureId?: string(name='SignatureId', description='The ID of the backend signature key.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      signatureKey?: string(name='SignatureKey', description='The Key value of the backend signature key.', example='qwertyuiop'),
      signatureName?: string(name='SignatureName', description='The name of the backend signature key.', example='backendsignature'),
      signatureSecret?: string(name='SignatureSecret', description='The Secret value of the backend signature key.', example='asdfghjkl'),
    }
  ](name='SignatureInfo')
  }(name='SignatureInfos', description='The returned signature information. It is an array consisting of SignatureInfo data.'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='20'),
}

model DescribeSignaturesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSignaturesResponseBody(name='body'),
}

/**
 * @summary Queries backend signature keys.
 *
 * @description *   This API is intended for API providers.
 * *   This operation is used to query the backend signature keys in a Region. Region is a system parameter.
 *
 * @param request DescribeSignaturesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSignaturesResponse
 */
async function describeSignaturesWithOptions(request: DescribeSignaturesRequest, runtime: Util.RuntimeOptions): DescribeSignaturesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  if (!Util.isUnset(request.signatureName)) {
    query['SignatureName'] = request.signatureName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSignatures',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries backend signature keys.
 *
 * @description *   This API is intended for API providers.
 * *   This operation is used to query the backend signature keys in a Region. Region is a system parameter.
 *
 * @param request DescribeSignaturesRequest
 * @return DescribeSignaturesResponse
 */
async function describeSignatures(request: DescribeSignaturesRequest): DescribeSignaturesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSignaturesWithOptions(request, runtime);
}

model DescribeSignaturesByApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6'),
  groupId?: string(name='GroupId', description='The ID of the group to which the API belongs.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model DescribeSignaturesByApiResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  signatures?: {
    signatureItem?: [ 
    {
      boundTime?: string(name='BoundTime', description='The time when the key was bound.', example='2016-07-23T08:28:48Z'),
      signatureId?: string(name='SignatureId', description='The ID of the backend signature key.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      signatureName?: string(name='SignatureName', description='The name of the backend signature key.', example='mysecret'),
    }
  ](name='SignatureItem')
  }(name='Signatures', description='The returned signature key information. It is an array consisting of SignatureItem data.'),
}

model DescribeSignaturesByApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSignaturesByApiResponseBody(name='body'),
}

/**
 * @summary Queries the backend signature keys that are bound to a specified API.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeSignaturesByApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSignaturesByApiResponse
 */
async function describeSignaturesByApiWithOptions(request: DescribeSignaturesByApiRequest, runtime: Util.RuntimeOptions): DescribeSignaturesByApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSignaturesByApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the backend signature keys that are bound to a specified API.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeSignaturesByApiRequest
 * @return DescribeSignaturesByApiResponse
 */
async function describeSignaturesByApi(request: DescribeSignaturesByApiRequest): DescribeSignaturesByApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSignaturesByApiWithOptions(request, runtime);
}

model DescribeSummaryDataRequest {
  securityToken?: string(name='SecurityToken'),
}

model DescribeSummaryDataResponseBody = {
  expireInstanceNum?: int32(name='ExpireInstanceNum', description='The number of subscription dedicated instances that expire in 14 days or less.', example='1'),
  region?: string(name='Region', description='The region ID.', example='cn-hangzhou'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  usageApiNum?: int32(name='UsageApiNum', description='The number of APIs.', example='10'),
  usageGroupNum?: int32(name='UsageGroupNum', description='The number of API groups.', example='1'),
  usageInstanceNum?: int32(name='UsageInstanceNum', description='The number of running dedicated instances.', example='1'),
}

model DescribeSummaryDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSummaryDataResponseBody(name='body'),
}

/**
 * @summary Queries the number of API Gateway resources in a region.
 *
 * @param request DescribeSummaryDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSummaryDataResponse
 */
async function describeSummaryDataWithOptions(request: DescribeSummaryDataRequest, runtime: Util.RuntimeOptions): DescribeSummaryDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSummaryData',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the number of API Gateway resources in a region.
 *
 * @param request DescribeSummaryDataRequest
 * @return DescribeSummaryDataResponse
 */
async function describeSummaryData(request: DescribeSummaryDataRequest): DescribeSummaryDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSummaryDataWithOptions(request, runtime);
}

model DescribeSystemParametersRequest {
  securityToken?: string(name='SecurityToken'),
}

model DescribeSystemParametersResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='0CCDF65E-6050-412D-AD68-FA3D9196836C'),
  systemParams?: {
    systemParamItem?: [ 
    {
      demoValue?: string(name='DemoValue', description='Examples', example='192.168.1.1'),
      description?: string(name='Description', description='The description of a parameter.', example='Client IP Address'),
      paramName?: string(name='ParamName', description='The name of the parameter.', example='CaClientIp'),
      paramType?: string(name='ParamType', description='The type of the parameter.', example='string'),
    }
  ](name='SystemParamItem')
  }(name='SystemParams', description='The returned information about system parameters. It is an array that consists of SystemParam data.'),
}

model DescribeSystemParametersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSystemParametersResponseBody(name='body'),
}

/**
 * @summary Queries the common parameters supported by the system.
 *
 * @description *   This API is intended for API callers.
 * *   The response of this API contains the system parameters that are optional in API definitions.
 *
 * @param request DescribeSystemParametersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSystemParametersResponse
 */
async function describeSystemParametersWithOptions(request: DescribeSystemParametersRequest, runtime: Util.RuntimeOptions): DescribeSystemParametersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSystemParameters',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the common parameters supported by the system.
 *
 * @description *   This API is intended for API callers.
 * *   The response of this API contains the system parameters that are optional in API definitions.
 *
 * @param request DescribeSystemParametersRequest
 * @return DescribeSystemParametersResponse
 */
async function describeSystemParameters(request: DescribeSystemParametersRequest): DescribeSystemParametersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSystemParametersWithOptions(request, runtime);
}

model DescribeTrafficControlsRequest {
  apiId?: string(name='ApiId', description='The specified API ID. This parameter must be specified together with GroupId and StageName.', example='3b81fd160f5645e097cc8855d75a1cf6'),
  groupId?: string(name='GroupId', description='The specified group ID. This parameter must be specified together with ApiId and StageName.', example='0009db9c828549768a200320714b8930'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='436fa39b-b3b9-40c5-ae5d-ce3e000e38c5'),
  stageName?: string(name='StageName', description='The environment name. This parameter must be specified together with GroupId and ApiId. Valid values:********

*   **RELEASE**
*   **TEST**', example='RELEASE'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.', example='tf123456'),
  trafficControlName?: string(name='TrafficControlName', description='The name of the throttling policy.', example='ThrottlingTest'),
}

model DescribeTrafficControlsResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='93D91A99-F093-4596-87BA-3C4FBFD3FD8A'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
  trafficControls?: {
    trafficControl?: [ 
    {
      apiDefault?: int32(name='ApiDefault', description='The default throttling value for each API.', example='20000'),
      appDefault?: int32(name='AppDefault', description='The default throttling value for each app.', example='8000'),
      createdTime?: string(name='CreatedTime', description='The creation time (UTC) of the throttling policy.', example='2016-01-27T10:19:39Z'),
      description?: string(name='Description', description='The description of the throttling policy.', example='test'),
      modifiedTime?: string(name='ModifiedTime', description='The last modification time (UTC) of the throttling policy.', example='2016-01-27T10:34:38Z'),
      specialPolicies?: {
        specialPolicy?: [ 
        {
          specialType?: string(name='SpecialType', description='The type of the special throttling policy. Valid values:

*   **APP**
*   **USER**', example='USER'),
          specials?: {
            special?: [ 
            {
              specialKey?: string(name='SpecialKey', description='The AppId or user account corresponding to SpecialType.', example='test_wg@aliyun.com'),
              trafficValue?: int32(name='TrafficValue', description='The throttling value.', example='100'),
            }
          ](name='Special')
          }(name='Specials', description='The returned information about a special throttling policy. It is an array consisting of Special data.'),
        }
      ](name='SpecialPolicy')
      }(name='SpecialPolicies', description='The returned information about a special throttling policy. It is an array consisting of SpecialPolicy data.'),
      trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.', example='cfed6c970d45481dbe136d6b5ac68c41'),
      trafficControlName?: string(name='TrafficControlName', description='The name of the throttling policy.', example='wulingtestq1'),
      trafficControlUnit?: string(name='TrafficControlUnit', description='The unit to be used in the throttling policy. Valid values:

*   MINUTE
*   HOUR
*   DAY', example='Minute'),
      userDefault?: int32(name='UserDefault', description='The default throttling value for each user.', example='15000'),
    }
  ](name='TrafficControl')
  }(name='TrafficControls', description='The returned throttling policy information. It is an array consisting of TrafficControl data.'),
}

model DescribeTrafficControlsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTrafficControlsResponseBody(name='body'),
}

/**
 * @summary Queries custom throttling policies and their details. Conditional queries are supported.
 *
 * @description *   This API is intended for API providers.
 * *   This API can be used to query all existing throttling policies (including special throttling policies) and their details.
 * *   You can specify query conditions. For example, you can query the throttling policies bound to a specified API or in a specified environment.
 *
 * @param request DescribeTrafficControlsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTrafficControlsResponse
 */
async function describeTrafficControlsWithOptions(request: DescribeTrafficControlsRequest, runtime: Util.RuntimeOptions): DescribeTrafficControlsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  if (!Util.isUnset(request.trafficControlName)) {
    query['TrafficControlName'] = request.trafficControlName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTrafficControls',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries custom throttling policies and their details. Conditional queries are supported.
 *
 * @description *   This API is intended for API providers.
 * *   This API can be used to query all existing throttling policies (including special throttling policies) and their details.
 * *   You can specify query conditions. For example, you can query the throttling policies bound to a specified API or in a specified environment.
 *
 * @param request DescribeTrafficControlsRequest
 * @return DescribeTrafficControlsResponse
 */
async function describeTrafficControls(request: DescribeTrafficControlsRequest): DescribeTrafficControlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTrafficControlsWithOptions(request, runtime);
}

model DescribeTrafficControlsByApiRequest {
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6'),
  groupId?: string(name='GroupId', description='The ID of the group to which the API to be queried belongs.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='7c51b234-48d3-44e1-9b36-e2ddccc738e3'),
  stageName?: string(name='StageName', description='The runtime environment of the API. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='RELEASE'),
}

model DescribeTrafficControlsByApiResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  trafficControlItems?: {
    trafficControlItem?: [ 
    {
      boundTime?: string(name='BoundTime', description='The binding time of the policy.', example='2016-07-23T08:28:48Z'),
      trafficControlItemId?: string(name='TrafficControlItemId', description='The ID of the throttling policy.', example='dd05f1c54d6749eda95f9fa6d491449a'),
      trafficControlItemName?: string(name='TrafficControlItemName', description='The name of the throttling policy.', example='mysecret'),
    }
  ](name='TrafficControlItem')
  }(name='TrafficControlItems', description='The returned throttling policy information. It is an array consisting of TrafficControlItem data.'),
}

model DescribeTrafficControlsByApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTrafficControlsByApiResponseBody(name='body'),
}

/**
 * @summary Queries the throttling policy that is bound to a specific API.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeTrafficControlsByApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTrafficControlsByApiResponse
 */
async function describeTrafficControlsByApiWithOptions(request: DescribeTrafficControlsByApiRequest, runtime: Util.RuntimeOptions): DescribeTrafficControlsByApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTrafficControlsByApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the throttling policy that is bound to a specific API.
 *
 * @description *   This API is intended for API providers.
 *
 * @param request DescribeTrafficControlsByApiRequest
 * @return DescribeTrafficControlsByApiResponse
 */
async function describeTrafficControlsByApi(request: DescribeTrafficControlsByApiRequest): DescribeTrafficControlsByApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTrafficControlsByApiWithOptions(request, runtime);
}

model DescribeUpdateBackendTaskRequest {
  operationUid?: string(name='OperationUid', description='This parameter is required.', example='4e13c3e0c44c4a4ebb5231264eeb9bc1'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeUpdateBackendTaskResponseBody = {
  apiUpdateBackendResults?: {
    apiUpdateBackendResult?: [ 
    {
      apiName?: string(name='ApiName', example='checkin_linechart_today'),
      apiUid?: string(name='ApiUid', example='14faa7ba0572445685866ddb6a6f19da'),
      backendId?: string(name='BackendId', example='c09b078bcb8f4ade9677bd8b18cdf43f'),
      errorMsg?: string(name='ErrorMsg', example='Failed'),
      groupId?: string(name='GroupId', example='3013a55c0c44483f984d26df27120513'),
      groupName?: string(name='GroupName', example='imotob1'),
      stageId?: string(name='StageId', example='d8f2f54f3309458b8aaceb36c01c2dd9'),
      stageName?: string(name='StageName', example='RELEASE'),
      updateStatus?: string(name='UpdateStatus', example='OVER'),
    }
  ](name='ApiUpdateBackendResult')
  }(name='ApiUpdateBackendResults'),
  requestId?: string(name='RequestId', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
}

model DescribeUpdateBackendTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUpdateBackendTaskResponseBody(name='body'),
}

/**
 * @summary 查询批量更新API后端元定结果
 *
 * @param request DescribeUpdateBackendTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUpdateBackendTaskResponse
 */
async function describeUpdateBackendTaskWithOptions(request: DescribeUpdateBackendTaskRequest, runtime: Util.RuntimeOptions): DescribeUpdateBackendTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.operationUid)) {
    query['OperationUid'] = request.operationUid;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUpdateBackendTask',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询批量更新API后端元定结果
 *
 * @param request DescribeUpdateBackendTaskRequest
 * @return DescribeUpdateBackendTaskResponse
 */
async function describeUpdateBackendTask(request: DescribeUpdateBackendTaskRequest): DescribeUpdateBackendTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUpdateBackendTaskWithOptions(request, runtime);
}

model DescribeUpdateVpcInfoTaskRequest {
  operationUid?: string(name='OperationUid', description='This parameter is required.', example='7d341787517a47afaaef9cc1bdb7acce'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeUpdateVpcInfoTaskResponseBody = {
  apiUpdateVpcInfoResults?: {
    apiUpdateVpcInfoResult?: [ 
    {
      apiName?: string(name='ApiName', example='api_test2'),
      apiUid?: string(name='ApiUid', example='86364e7c166c47ba819b3f8f95ac0913'),
      errorMsg?: string(name='ErrorMsg', example='Success. Request Success.'),
      groupId?: string(name='GroupId', example='e8da6f6346184da9a30d0dc1888b1f3b'),
      groupName?: string(name='GroupName', example='test'),
      stageId?: string(name='StageId', example='fe952b95072747e2a8dfd336bcff8d7f'),
      stageName?: string(name='StageName', example='RELEASE'),
      updateStatus?: string(name='UpdateStatus', example='success'),
    }
  ](name='ApiUpdateVpcInfoResult')
  }(name='ApiUpdateVpcInfoResults'),
  requestId?: string(name='RequestId', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model DescribeUpdateVpcInfoTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUpdateVpcInfoTaskResponseBody(name='body'),
}

/**
 * @summary 查询更新VPC授权的任务
 *
 * @param request DescribeUpdateVpcInfoTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUpdateVpcInfoTaskResponse
 */
async function describeUpdateVpcInfoTaskWithOptions(request: DescribeUpdateVpcInfoTaskRequest, runtime: Util.RuntimeOptions): DescribeUpdateVpcInfoTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.operationUid)) {
    query['OperationUid'] = request.operationUid;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUpdateVpcInfoTask',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询更新VPC授权的任务
 *
 * @param request DescribeUpdateVpcInfoTaskRequest
 * @return DescribeUpdateVpcInfoTaskResponse
 */
async function describeUpdateVpcInfoTask(request: DescribeUpdateVpcInfoTaskRequest): DescribeUpdateVpcInfoTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUpdateVpcInfoTaskWithOptions(request, runtime);
}

model DescribeVpcAccessesRequest {
  accurateQuery?: boolean(name='AccurateQuery', description='Whether to conduct precise queries', example='false'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.', example='10.199.26.***'),
  name?: string(name='Name', description='The name of the authorization. The name must be unique.', example='wuying-edm-svc'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Pages start from page 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: 100. Default value: 10.', example='10'),
  port?: string(name='Port', description='The service port.', example='8080'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='appname'),
      value?: string(name='Value', description='The tag value.', example='product'),
    }
  ](name='Tag', description='The port number.'),
  vpcAccessId?: string(name='VpcAccessId', description='The ID of the VPC authorization.', example='vpc-*****ssds24'),
  vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-uf657qec7lx42paw3qxxx'),
}

model DescribeVpcAccessesResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page.', example='10'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='8883AC74-259D-4C0B-99FC-0B7F9A588B2F'),
  totalCount?: int32(name='TotalCount', description='The total number of returned entries.', example='1'),
  vpcAccessAttributes?: {
    vpcAccessAttribute?: [ 
    {
      createdTime?: string(name='CreatedTime', description='The time when the authorization was created.', example='2017-01-30T04:10:19Z'),
      description?: string(name='Description', description='The description of the VPC access authorization.', example='Test'),
      instanceId?: string(name='InstanceId', description='The ID of an Elastic Compute Service (ECS) or Server Load Balancer (SLB) instance in the VPC.', example='i-uf6bzcg1pr4oh5jjmxxx'),
      name?: string(name='Name', description='The name of the authorization.', example='test'),
      port?: int32(name='Port', description='The port number that corresponds to the instance.', example='80'),
      regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
      tags?: {
        tagInfo?: [ 
        {
          key?: string(name='Key', description='The tag key.', example='PROJECT'),
          value?: string(name='Value', description='The tag value.', example='6427a17ae6041d1be62414e4'),
        }
      ](name='TagInfo')
      }(name='Tags', description='The tags.'),
      vpcAccessId?: string(name='VpcAccessId', description='The ID of the VPC access authorization.', example='vpc-*****ssds24'),
      vpcId?: string(name='VpcId', description='The VPC ID.', example='vpc-uf657qec7lx42paw3qxxx'),
      vpcTargetHostName?: string(name='VpcTargetHostName', description='The host of the backend service.', example='hos-a***.fh-**nc.com'),
    }
  ](name='VpcAccessAttribute')
  }(name='VpcAccessAttributes', description='The information about the VPC access authorization. The information is an array consisting of VpcAccessAttribute data.'),
}

model DescribeVpcAccessesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVpcAccessesResponseBody(name='body'),
}

/**
 * @summary Queries VPC access authorizations.
 *
 * @param request DescribeVpcAccessesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVpcAccessesResponse
 */
async function describeVpcAccessesWithOptions(request: DescribeVpcAccessesRequest, runtime: Util.RuntimeOptions): DescribeVpcAccessesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accurateQuery)) {
    query['AccurateQuery'] = request.accurateQuery;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.vpcAccessId)) {
    query['VpcAccessId'] = request.vpcAccessId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVpcAccesses',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries VPC access authorizations.
 *
 * @param request DescribeVpcAccessesRequest
 * @return DescribeVpcAccessesResponse
 */
async function describeVpcAccesses(request: DescribeVpcAccessesRequest): DescribeVpcAccessesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVpcAccessesWithOptions(request, runtime);
}

model DescribeZonesRequest {
  language?: string(name='Language', description='The language in which you want to use to return the description of the system policy. Valid values:

*   en: English
*   zh-CN: Chinese
*   ja: Japanese', example='zh'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeZonesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9324B68F-9863-5722-A0FD-0798E2B02A0E'),
  zones?: {
    zone?: [ 
    {
      localName?: string(name='LocalName', description='The name of the zone.', example='China (Hangzhou) Multi-zone 2(j,g)'),
      zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-hangzhou-MAZ2(j,g)'),
    }
  ](name='Zone')
  }(name='Zones', description='The zones available in the current region.', example='{\\\\"Zone\\\\": [{\\\\"ZoneId\\\\": \\\\"cn-hangzhou-i\\\\"}]}'),
}

model DescribeZonesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeZonesResponseBody(name='body'),
}

/**
 * @summary Queries zones in a region.
 *
 * @param request DescribeZonesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeZonesResponse
 */
async function describeZonesWithOptions(request: DescribeZonesRequest, runtime: Util.RuntimeOptions): DescribeZonesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeZones',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries zones in a region.
 *
 * @param request DescribeZonesRequest
 * @return DescribeZonesResponse
 */
async function describeZones(request: DescribeZonesRequest): DescribeZonesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeZonesWithOptions(request, runtime);
}

model DetachApiProductRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  apis?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.

This parameter is required.', example='ba84c55eca46488598da17c0609f3ead'),
      stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
    }
  ](name='Apis', description='The APIs that you want to detach from the API product.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model DetachApiProductResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='98E4A7DC-1EA6-5E6A-ACFE-91B60CE7D4BB'),
}

model DetachApiProductResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachApiProductResponseBody(name='body'),
}

/**
 * @summary Detaches APIs from an API product.
 *
 * @param request DetachApiProductRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachApiProductResponse
 */
async function detachApiProductWithOptions(request: DetachApiProductRequest, runtime: Util.RuntimeOptions): DetachApiProductResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.apis)) {
    query['Apis'] = request.apis;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DetachApiProduct',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Detaches APIs from an API product.
 *
 * @param request DetachApiProductRequest
 * @return DetachApiProductResponse
 */
async function detachApiProduct(request: DetachApiProductRequest): DetachApiProductResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachApiProductWithOptions(request, runtime);
}

model DetachGroupPluginRequest {
  groupId?: string(name='GroupId', description='API group ID

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  pluginId?: string(name='PluginId', description='API Gateway plugin ID

This parameter is required.', example='a96926e82f994915a8da40a119374537'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='Specify the environment of the API to operate on.

- **RELEASE**: Production
- **PRE**: Pre-release
- **TEST**: Test

This parameter is required.', example='RELEASE'),
}

model DetachGroupPluginResponseBody = {
  requestId?: string(name='RequestId', description='Request ID', example='3707E6FA-749C-5352-B72A-ABE95D9DEA49'),
}

model DetachGroupPluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachGroupPluginResponseBody(name='body'),
}

/**
 * @summary Unbind group plugin
 *
 * @param request DetachGroupPluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachGroupPluginResponse
 */
async function detachGroupPluginWithOptions(request: DetachGroupPluginRequest, runtime: Util.RuntimeOptions): DetachGroupPluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DetachGroupPlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbind group plugin
 *
 * @param request DetachGroupPluginRequest
 * @return DetachGroupPluginResponse
 */
async function detachGroupPlugin(request: DetachGroupPluginRequest): DetachGroupPluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachGroupPluginWithOptions(request, runtime);
}

model DetachPluginRequest {
  apiId?: string(name='ApiId', example='19a2846d8e8541c788c6be740035eb68'),
  groupId?: string(name='GroupId', example='93b87279e54c4c0baeb7113cdf9c67f5'),
  pluginId?: string(name='PluginId', description='This parameter is required.', example='05df2b52a3644a3a8b1935ab8ab59e9d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='This parameter is required.', example='RELEASE'),
}

model DetachPluginResponseBody = {
  requestId?: string(name='RequestId', example='AD00F8C0-311B-54A9-ADE2-2436771012DA'),
}

model DetachPluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachPluginResponseBody(name='body'),
}

/**
 * @summary 解绑插件
 *
 * @param request DetachPluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachPluginResponse
 */
async function detachPluginWithOptions(request: DetachPluginRequest, runtime: Util.RuntimeOptions): DetachPluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DetachPlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑插件
 *
 * @param request DetachPluginRequest
 * @return DetachPluginResponse
 */
async function detachPlugin(request: DetachPluginRequest): DetachPluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachPluginWithOptions(request, runtime);
}

model DisableInstanceAccessControlRequest {
  aclId?: string(name='AclId', description='The ID of the access control policy.

This parameter is required.', example='acl-grgqc0mnuhkqciwtam'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-v6419k43xxxxx'),
  securityToken?: string(name='SecurityToken'),
}

model DisableInstanceAccessControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
}

model DisableInstanceAccessControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisableInstanceAccessControlResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated API Gateway instances. Disables access control on an instance.
 *
 * @param request DisableInstanceAccessControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisableInstanceAccessControlResponse
 */
async function disableInstanceAccessControlWithOptions(request: DisableInstanceAccessControlRequest, runtime: Util.RuntimeOptions): DisableInstanceAccessControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableInstanceAccessControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated API Gateway instances. Disables access control on an instance.
 *
 * @param request DisableInstanceAccessControlRequest
 * @return DisableInstanceAccessControlResponse
 */
async function disableInstanceAccessControl(request: DisableInstanceAccessControlRequest): DisableInstanceAccessControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableInstanceAccessControlWithOptions(request, runtime);
}

model DissociateInstanceWithPrivateDNSRequest {
  instanceId?: string(name='InstanceId', description='The instance ID.

This parameter is required.', example='apigateway-hz-ead4f4b0bac8'),
  intranetDomains?: [ string ](name='IntranetDomains', description='The internal domain names included in the resolution.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model DissociateInstanceWithPrivateDNSShrinkRequest {
  instanceId?: string(name='InstanceId', description='The instance ID.

This parameter is required.', example='apigateway-hz-ead4f4b0bac8'),
  intranetDomainsShrink?: string(name='IntranetDomains', description='The internal domain names included in the resolution.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model DissociateInstanceWithPrivateDNSResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
}

model DissociateInstanceWithPrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DissociateInstanceWithPrivateDNSResponseBody(name='body'),
}

/**
 * @summary Disassociates an internal domain name resolution from a dedicated instance.
 *
 * @param tmpReq DissociateInstanceWithPrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DissociateInstanceWithPrivateDNSResponse
 */
async function dissociateInstanceWithPrivateDNSWithOptions(tmpReq: DissociateInstanceWithPrivateDNSRequest, runtime: Util.RuntimeOptions): DissociateInstanceWithPrivateDNSResponse {
  Util.validateModel(tmpReq);
  var request = new DissociateInstanceWithPrivateDNSShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.intranetDomains)) {
    request.intranetDomainsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.intranetDomains, 'IntranetDomains', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.intranetDomainsShrink)) {
    body['IntranetDomains'] = request.intranetDomainsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DissociateInstanceWithPrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Disassociates an internal domain name resolution from a dedicated instance.
 *
 * @param request DissociateInstanceWithPrivateDNSRequest
 * @return DissociateInstanceWithPrivateDNSResponse
 */
async function dissociateInstanceWithPrivateDNS(request: DissociateInstanceWithPrivateDNSRequest): DissociateInstanceWithPrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return dissociateInstanceWithPrivateDNSWithOptions(request, runtime);
}

model DryRunSwaggerRequest {
  data?: string(name='Data', description='The Swagger text content.

This parameter is required.', example='"A Swagger API definition in YAML"'),
  dataFormat?: string(name='DataFormat', description='The Swagger text format:

*   json
*   yaml

This parameter is required.', example='yaml'),
  globalCondition?: map[string]any(name='GlobalCondition', description='The global condition.', example='{}'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='d633cf5524f841b9950e245b191bdabf'),
  overwrite?: boolean(name='Overwrite', description='Specifies whether to overwrite the existing API.

APIs with the same HTTP request type and backend request path are considered the same.

This parameter is required.', example='true'),
  securityToken?: string(name='SecurityToken'),
}

model DryRunSwaggerShrinkRequest {
  data?: string(name='Data', description='The Swagger text content.

This parameter is required.', example='"A Swagger API definition in YAML"'),
  dataFormat?: string(name='DataFormat', description='The Swagger text format:

*   json
*   yaml

This parameter is required.', example='yaml'),
  globalConditionShrink?: string(name='GlobalCondition', description='The global condition.', example='{}'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='d633cf5524f841b9950e245b191bdabf'),
  overwrite?: boolean(name='Overwrite', description='Specifies whether to overwrite the existing API.

APIs with the same HTTP request type and backend request path are considered the same.

This parameter is required.', example='true'),
  securityToken?: string(name='SecurityToken'),
}

model DryRunSwaggerResponseBody = {
  failed?: {
    apiImportSwaggerFailed?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message returned when the API is created.', example='api already exists : apiUid ===> 8e274ec61cf6468e83b68371956831cb'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when the API is created.', example='post'),
      path?: string(name='Path', description='The request path configured when the API is created.', example='/http/get/mapping'),
    }
  ](name='ApiImportSwaggerFailed')
  }(name='Failed', description='The APIs that failed to be created based on the Swagger-compliant data imported this time.'),
  globalCondition?: string(name='GlobalCondition', description='The global condition.', example='{}'),
  modelFailed?: {
    apiImportModelFailed?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='Not Found'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='36d4bcfaec1946e1870d90b2d7519710'),
      modelName?: string(name='ModelName', description='The name of the model.', example='Region'),
    }
  ](name='ApiImportModelFailed')
  }(name='ModelFailed', description='The models that failed to be imported through the Swagger-compliant data this time.'),
  modelSuccess?: {
    apiImportModelSuccess?: [ 
    {
      groupId?: string(name='GroupId', description='The ID of the API group.', example='b2d552ed90ca435b86f7bf8d45414793'),
      modelName?: string(name='ModelName', description='The name of the model.', example='NewInstance'),
      modelOperation?: string(name='ModelOperation', description='The model operation.', example='CREATE'),
      modelUid?: string(name='ModelUid', description='The UID of the model.', example='ec1946e1870d90b2d7519'),
    }
  ](name='ApiImportModelSuccess')
  }(name='ModelSuccess', description='The models that failed to be imported through the Swagger-compliant data this time.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
  success?: {
    apiDryRunSwaggerSuccess?: [ 
    {
      apiOperation?: string(name='ApiOperation', description='Specifies whether the operation is CREATE or MODIFY.', example='CREATE'),
      apiSwagger?: string(name='ApiSwagger', description='The API definition that complies with the Swagger specification.', example='"A Swagger API definition in YAML"'),
      apiUid?: string(name='ApiUid', description='The UID of the successfully imported API.', example='8e274ec61cf6468e83b68371956831cb'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when the API is created.', example='get'),
      path?: string(name='Path', description='The request path configured when the API is created.', example='/http/get/mapping'),
    }
  ](name='ApiDryRunSwaggerSuccess')
  }(name='Success', description='The APIs that are created based on the Swagger-compliant data imported this time.'),
}

model DryRunSwaggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DryRunSwaggerResponseBody(name='body'),
}

/**
 * @summary Checks the syntax before Swagger-compliant data is imported.
 *
 * @param tmpReq DryRunSwaggerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DryRunSwaggerResponse
 */
async function dryRunSwaggerWithOptions(tmpReq: DryRunSwaggerRequest, runtime: Util.RuntimeOptions): DryRunSwaggerResponse {
  Util.validateModel(tmpReq);
  var request = new DryRunSwaggerShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.globalCondition)) {
    request.globalConditionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.globalCondition, 'GlobalCondition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataFormat)) {
    query['DataFormat'] = request.dataFormat;
  }
  if (!Util.isUnset(request.globalConditionShrink)) {
    query['GlobalCondition'] = request.globalConditionShrink;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.overwrite)) {
    query['Overwrite'] = request.overwrite;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DryRunSwagger',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Checks the syntax before Swagger-compliant data is imported.
 *
 * @param request DryRunSwaggerRequest
 * @return DryRunSwaggerResponse
 */
async function dryRunSwagger(request: DryRunSwaggerRequest): DryRunSwaggerResponse {
  var runtime = new Util.RuntimeOptions{};
  return dryRunSwaggerWithOptions(request, runtime);
}

model EnableInstanceAccessControlRequest {
  aclId?: string(name='AclId', description='The ID of the access control policy.

This parameter is required.', example='acl-bp11escro2et2tioscy52'),
  aclType?: string(name='AclType', description='The ACL type. Valid values:

*   black: blacklist
*   white: whitelist

This parameter is required.', example='black'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-v6419k43xxxxx'),
  securityToken?: string(name='SecurityToken'),
}

model EnableInstanceAccessControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
}

model EnableInstanceAccessControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableInstanceAccessControlResponseBody(name='body'),
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated API Gateway instances. Specifies the access control policy of an instance.
 *
 * @param request EnableInstanceAccessControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableInstanceAccessControlResponse
 */
async function enableInstanceAccessControlWithOptions(request: EnableInstanceAccessControlRequest, runtime: Util.RuntimeOptions): EnableInstanceAccessControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableInstanceAccessControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary This feature provides instance-level access control capabilities for dedicated API Gateway instances. Specifies the access control policy of an instance.
 *
 * @param request EnableInstanceAccessControlRequest
 * @return EnableInstanceAccessControlResponse
 */
async function enableInstanceAccessControl(request: EnableInstanceAccessControlRequest): EnableInstanceAccessControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableInstanceAccessControlWithOptions(request, runtime);
}

model ExportOASRequest {
  apiIdList?: [ string ](name='ApiIdList', description='The APIs that you want to export.'),
  dataFormat?: string(name='DataFormat', description='The exported format:

*   json
*   yaml', example='yaml'),
  groupId?: string(name='GroupId', description='The API group ID.', example='42925e7f5209438186d5560239af5xxx'),
  oasVersion?: string(name='OasVersion', description='The OAS version. Valid values:

*   **oas2**
*   **oas3**', example='oas2'),
  pageNumber?: int32(name='PageNumber', description='The number of pages in which you want to export the APIs.', example='1'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment', example='RELEASE'),
  withXExtensions?: boolean(name='WithXExtensions', description='Specifies whether to export API Gateway extensions at the same time.', example='true'),
}

model ExportOASShrinkRequest {
  apiIdListShrink?: string(name='ApiIdList', description='The APIs that you want to export.'),
  dataFormat?: string(name='DataFormat', description='The exported format:

*   json
*   yaml', example='yaml'),
  groupId?: string(name='GroupId', description='The API group ID.', example='42925e7f5209438186d5560239af5xxx'),
  oasVersion?: string(name='OasVersion', description='The OAS version. Valid values:

*   **oas2**
*   **oas3**', example='oas2'),
  pageNumber?: int32(name='PageNumber', description='The number of pages in which you want to export the APIs.', example='1'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment to which the API is published. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the pre-release environment
*   **TEST**: the test environment', example='RELEASE'),
  withXExtensions?: boolean(name='WithXExtensions', description='Specifies whether to export API Gateway extensions at the same time.', example='true'),
}

model ExportOASResponseBody = {
  data?: string(name='Data', description='The Base64-encoded data of the exported Swagger file. You can obtain the file by using Base64 decoding.', example='UEsDBBQACAAIAABc8FgAAAAAAAAAAAAAAAA...'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876xxxxxxxx'),
}

model ExportOASResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportOASResponseBody(name='body'),
}

/**
 * @summary 导出OAS
 *
 * @param tmpReq ExportOASRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportOASResponse
 */
async function exportOASWithOptions(tmpReq: ExportOASRequest, runtime: Util.RuntimeOptions): ExportOASResponse {
  Util.validateModel(tmpReq);
  var request = new ExportOASShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.apiIdList)) {
    request.apiIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.apiIdList, 'ApiIdList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiIdListShrink)) {
    query['ApiIdList'] = request.apiIdListShrink;
  }
  if (!Util.isUnset(request.dataFormat)) {
    query['DataFormat'] = request.dataFormat;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.oasVersion)) {
    query['OasVersion'] = request.oasVersion;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.withXExtensions)) {
    query['WithXExtensions'] = request.withXExtensions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExportOAS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出OAS
 *
 * @param request ExportOASRequest
 * @return ExportOASResponse
 */
async function exportOAS(request: ExportOASRequest): ExportOASResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportOASWithOptions(request, runtime);
}

model ImportOASRequest {
  authType?: string(name='AuthType', description='The security authentication method of the API. Valid values:

*   **APP: Only authorized applications can call the API.**

*   **ANONYMOUS: The API can be anonymously called. In this mode, you must take note of the following rules:**

    *   All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If you make this API public, set API-specific throttling policies.', example='APP'),
  backendName?: string(name='BackendName', description='The name of the backend service.', example='testBackendService'),
  data?: string(name='Data', description='The OAS-compliant text file or OSS object URL.

This parameter is required.', example='swagger: "2.0"
info:
  version: "1.0.0"
  title: "Swagger Petstore 2.0"
basePath: "/"
schemes:
- "https"
- "http"
paths:
  /pet/findByStatus:
    get:
      tags:
      - "pet"
      summary: "Finds Pets by status"
      operationId: "findPetsByStatus"
      parameters:
      - name: "status"
        in: "query"
        required: true
        type: "array"
        items:
          type: "string"
          enum:
          - "available"
          - "pending"
          - "sold"
          default: "available"
        collectionFormat: "multi"
      responses:
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Pet"
        "400":
          description: "Invalid status value"
definitions:
  Category:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      name:
        type: "string"
  Tag:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      name:
        type: "string"
  Pet:
    type: "object"
    required:
    - "name"
    - "photoUrls"
    properties:
      id:
        type: "integer"
        format: "int64"
      category:
        $ref: "#/definitions/Category"
      name:
        type: "string"
        example: "doggie"
      photoUrls:
        type: "array"
        items:
          type: "string"
      tags:
        type: "array"
        items:
          $ref: "#/definitions/Tag"
      status:
        type: "string"
        description: "pet status in the store"
        enum:
        - "available"
        - "pending"
        - "sold"'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='08ae4aa0f95e4321849ee57f4e0b3077'),
  ignoreWarning?: boolean(name='IgnoreWarning', description='Specifies whether to ignore alerts.', example='true'),
  OASVersion?: string(name='OASVersion', description='The OAS version.', example='OAS2'),
  overwrite?: boolean(name='Overwrite', description='Specifies whether to overwrite an existing API.

If an existing API has the same HTTP request type and backend request path as the API to be imported, the existing API is overwritten.

This parameter is required.', example='true'),
  requestMode?: string(name='RequestMode', description='The request mode. Valid values:

*   MAPPING: Parameters are mapped. Unknown parameters are filtered out.
*   PASSTHROUGH: Parameters are passed through.', example='PASSTHROUGH'),
  securityToken?: string(name='SecurityToken'),
  skipDryRun?: boolean(name='SkipDryRun', description='Specifies whether to directly import the API without performing a precheck.', example='true'),
}

model ImportOASResponseBody = {
  errorMessages?: {
    errorMessage?: [ string ](name='ErrorMessage')
  }(name='ErrorMessages', description='The error messages that appear due to the invalid data in the imported file.'),
  failedApis?: {
    failedApi?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='Invalid Api Definition.'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when you created the API.', example='POST'),
      path?: string(name='Path', description='The request path configured when you created the API.', example='/st1'),
    }
  ](name='FailedApi')
  }(name='FailedApis', description='The APIs that failed to pass the precheck.'),
  failedModels?: {
    failedModel?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='Invalid Model Definition.'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='2c1bc62e19614cc68c6b0b484bc9c5db'),
      modelName?: string(name='ModelName', description='The name of the model.', example='test'),
    }
  ](name='FailedModel')
  }(name='FailedModels', description='The information about the models that failed to pass the precheck.'),
  operationId?: string(name='OperationId', description='The ID of the asynchronous API import task that was generated during the import operation. This ID is used to query the execution status of the API import task.', example='c16a1880f5164d779f6a54f64d997cd9'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E7FE7172-AA75-5880-B6F7-C00893E9BC06'),
  successApis?: {
    successApi?: [ 
    {
      apiId?: string(name='ApiId', description='The ID of the API.', example='92af1abffc2443eaa2b815fdbd9c13f1'),
      apiOperation?: string(name='ApiOperation', description='Indicates that the operation is CREATE or MODIFY.', example='CREATE'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when you created the API.', example='POST'),
      path?: string(name='Path', description='The request path configured when you created the API.', example='/st1'),
    }
  ](name='SuccessApi')
  }(name='SuccessApis', description='The information about the APIs that have passed the precheck.'),
  successModels?: {
    successModel?: [ 
    {
      groupId?: string(name='GroupId', description='The ID of the API group.', example='feaccf67040643bcbdedb253e59eb527'),
      modelName?: string(name='ModelName', description='The name of the model.', example='test'),
      modelOperation?: string(name='ModelOperation', description='The operation of the model. Valid values: CREATE and MODIFY.', example='CREATE'),
      modelUid?: string(name='ModelUid', description='The UID of the model.', example='1r4efwee19614cc68c6b0b484bc9c5dbs'),
    }
  ](name='SuccessModel')
  }(name='SuccessModels', description='The information about the models that have passed the precheck.'),
  warningMessages?: {
    warningMessage?: [ string ](name='WarningMessage')
  }(name='WarningMessages', description='The warning messages that appear due to the invalid data in the imported file.'),
}

model ImportOASResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportOASResponseBody(name='body'),
}

/**
 * @summary Imports APIs based on the OAS standard.
 *
 * @param request ImportOASRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportOASResponse
 */
async function importOASWithOptions(request: ImportOASRequest, runtime: Util.RuntimeOptions): ImportOASResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.authType)) {
    query['AuthType'] = request.authType;
  }
  if (!Util.isUnset(request.backendName)) {
    query['BackendName'] = request.backendName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ignoreWarning)) {
    query['IgnoreWarning'] = request.ignoreWarning;
  }
  if (!Util.isUnset(request.OASVersion)) {
    query['OASVersion'] = request.OASVersion;
  }
  if (!Util.isUnset(request.overwrite)) {
    query['Overwrite'] = request.overwrite;
  }
  if (!Util.isUnset(request.requestMode)) {
    query['RequestMode'] = request.requestMode;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.skipDryRun)) {
    query['SkipDryRun'] = request.skipDryRun;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ImportOAS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Imports APIs based on the OAS standard.
 *
 * @param request ImportOASRequest
 * @return ImportOASResponse
 */
async function importOAS(request: ImportOASRequest): ImportOASResponse {
  var runtime = new Util.RuntimeOptions{};
  return importOASWithOptions(request, runtime);
}

model ImportSwaggerRequest {
  data?: string(name='Data', description='The Swagger text content.

This parameter is required.', example='"A Swagger API definition in YAML"'),
  dataFormat?: string(name='DataFormat', description='The Swagger text format:

*   json
*   yaml

This parameter is required.', example='yaml'),
  dryRun?: boolean(name='DryRun', description='The pre-inspection.', example='true'),
  globalCondition?: map[string]any(name='GlobalCondition', description='The global conditions.', example='{}'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the Swagger is imported.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  overwrite?: boolean(name='Overwrite', description='Specifies whether to overwrite the existing API.

APIs with the same HTTP request type and backend request path are considered the same.

This parameter is required.', example='true'),
  securityToken?: string(name='SecurityToken'),
}

model ImportSwaggerShrinkRequest {
  data?: string(name='Data', description='The Swagger text content.

This parameter is required.', example='"A Swagger API definition in YAML"'),
  dataFormat?: string(name='DataFormat', description='The Swagger text format:

*   json
*   yaml

This parameter is required.', example='yaml'),
  dryRun?: boolean(name='DryRun', description='The pre-inspection.', example='true'),
  globalConditionShrink?: string(name='GlobalCondition', description='The global conditions.', example='{}'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the Swagger is imported.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  overwrite?: boolean(name='Overwrite', description='Specifies whether to overwrite the existing API.

APIs with the same HTTP request type and backend request path are considered the same.

This parameter is required.', example='true'),
  securityToken?: string(name='SecurityToken'),
}

model ImportSwaggerResponseBody = {
  failed?: {
    apiImportSwaggerFailed?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message returned when the API is created.', example='api already exists : apiUid ===> 8e274ec61cf6468e83b68371956831cb'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when the API is created.', example='post'),
      path?: string(name='Path', description='The request path configured when the API is created.', example='/http/get/mapping'),
    }
  ](name='ApiImportSwaggerFailed')
  }(name='Failed', description='The APIs that failed to be created based on the Swagger-compliant data imported this time.'),
  modelFailed?: {
    apiImportModelFailed?: [ 
    {
      errorMsg?: string(name='ErrorMsg', description='The error message.', example='error msg'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='36d4bcfaec1946e1870d90b2d7519710'),
      modelName?: string(name='ModelName', description='The name of the model.', example='Region'),
    }
  ](name='ApiImportModelFailed')
  }(name='ModelFailed', description='The models that failed to be imported through the Swagger-compliant data this time.'),
  modelSuccess?: {
    apiImportModelSuccess?: [ 
    {
      groupId?: string(name='GroupId', description='The ID of the API group.', example='b2d552ed90ca435b86f7bf8d45414793'),
      modelName?: string(name='ModelName', description='The name of the model.', example='NewInstance'),
      modelOperation?: string(name='ModelOperation', description='The model operation', example='CREATE'),
      modelUid?: string(name='ModelUid', description='The UID of the model.', example='d4bcfaec1946e1870d'),
    }
  ](name='ApiImportModelSuccess')
  }(name='ModelSuccess', description='The models that were imported through the Swagger-compliant data this time.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='647CEF05-404C-4125-B3D7-44792EB77392'),
  success?: {
    apiImportSwaggerSuccess?: [ 
    {
      apiOperation?: string(name='ApiOperation', description='Specifies whether the operation is CREATE or MODIFY.', example='CREATE'),
      apiUid?: string(name='ApiUid', description='The UID of the successfully imported API.', example='8e274ec61cf6468e83b68371956831cb'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method configured when the API is created.', example='get'),
      path?: string(name='Path', description='The request path configured when the API is created.', example='/http/get/mapping'),
    }
  ](name='ApiImportSwaggerSuccess')
  }(name='Success', description='The APIs that are created based on the Swagger-compliant data imported this time.'),
}

model ImportSwaggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportSwaggerResponseBody(name='body'),
}

/**
 * @summary Creates an API by importing Swagger-compliant data.
 *
 * @description *   Alibaba Cloud supports extensions based on Swagger 2.0.
 * *   Alibaba Cloud supports Swagger configuration files in JSON and YAML formats.
 *
 * @param tmpReq ImportSwaggerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportSwaggerResponse
 */
async function importSwaggerWithOptions(tmpReq: ImportSwaggerRequest, runtime: Util.RuntimeOptions): ImportSwaggerResponse {
  Util.validateModel(tmpReq);
  var request = new ImportSwaggerShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.globalCondition)) {
    request.globalConditionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.globalCondition, 'GlobalCondition', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataFormat)) {
    query['DataFormat'] = request.dataFormat;
  }
  if (!Util.isUnset(request.dryRun)) {
    query['DryRun'] = request.dryRun;
  }
  if (!Util.isUnset(request.globalConditionShrink)) {
    query['GlobalCondition'] = request.globalConditionShrink;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.overwrite)) {
    query['Overwrite'] = request.overwrite;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ImportSwagger',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an API by importing Swagger-compliant data.
 *
 * @description *   Alibaba Cloud supports extensions based on Swagger 2.0.
 * *   Alibaba Cloud supports Swagger configuration files in JSON and YAML formats.
 *
 * @param request ImportSwaggerRequest
 * @return ImportSwaggerResponse
 */
async function importSwagger(request: ImportSwaggerRequest): ImportSwaggerResponse {
  var runtime = new Util.RuntimeOptions{};
  return importSwaggerWithOptions(request, runtime);
}

model ListPrivateDNSRequest {
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.', example='api.demo.com'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for virtual private cloud (VPC) access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.', example='A'),
}

model ListPrivateDNSResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  privateDNSList?: [ 
    {
      bindInstances?: [ string ](name='BindInstances', description='The instances that are associated with the resolution.'),
      createdTime?: string(name='CreatedTime', description='The time when the resolution was created. The time is displayed in UTC.', example='2023-05-10T08:17:00Z'),
      intranetDomain?: string(name='IntranetDomain', description='The internal domain name.', example='api.demo.com'),
      records?: [ 
        {
          record?: string(name='Record', description='The resolution record.', example='192.168.0.1'),
          weight?: int32(name='Weight', description='The weight of the record.', example='100'),
        }
      ](name='Records', description='The resolution records.'),
      type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for VPC access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.', example='A'),
    }
  ](name='PrivateDNSList', description='The internal domain name resolutions.'),
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'),
}

model ListPrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateDNSResponseBody(name='body'),
}

/**
 * @summary Queries internal domain name resolutions by domain name or resolution type.
 *
 * @param request ListPrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateDNSResponse
 */
async function listPrivateDNSWithOptions(request: ListPrivateDNSRequest, runtime: Util.RuntimeOptions): ListPrivateDNSResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.intranetDomain)) {
    query['IntranetDomain'] = request.intranetDomain;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries internal domain name resolutions by domain name or resolution type.
 *
 * @param request ListPrivateDNSRequest
 * @return ListPrivateDNSResponse
 */
async function listPrivateDNS(request: ListPrivateDNSRequest): ListPrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPrivateDNSWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken', description='The token used to start the next query.', example='1d2db86sca4384811e0b5e8707e68181f'),
  resourceId?: [ string ](name='ResourceId', description='The ID of the resource.

Valid values of N: `[1,50]`.', example='285bb759342649a1b70c2093a772e087'),
  resourceType?: string(name='ResourceType', description='The type of the resource.

Currently, tags are supported for API groups, plug-ins, and apps. Operations performed on APIs are based on the tags of API groups.

*   **apiGroup**
*   **plugin**
*   **app**
*   **api**

This parameter is required.', example='apiGroup'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

Valid values of N: `[1,20]`.', example='env'),
      value?: string(name='Value', description='The value of the tag. If the parameter has a value, a value is also required for the tag key of the same N in the corresponding **tag.N.Key**. Otherwise, an error is reported.

Valid values of N: `[1,20]`.', example='product'),
    }
  ](name='Tag', description='The tag of objects that match the lifecycle rule. You can specify multiple tags.'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken', description='The token that determines the start point of the next query.

A NextToken value of -1 indicates that a next query does not exist.', example='1d2db86sca4384811e0b5e8707e68181f'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='2D69A58F-345C-4FDE-88E4-BF5189484043'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId', description='The ID of the resource.', example='285bb759342649a1b70c2093a772e087'),
      resourceType?: string(name='ResourceType', description='The type of the resource.', example='apiGroup'),
      tagKey?: string(name='TagKey', description='The key of the tag.', example='owner'),
      tagValue?: string(name='TagValue', description='The value of the tag.', example='zhangsan'),
    }
  ](name='TagResource')
  }(name='TagResources', description='The resource list.'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries the visible resource tags.
 *
 * @description *   The Tag.N.Key and Tag.N.Value parameters constitute a key-value pair.
 * *   ResourceId.N must meet all the key-value pairs that are entered. If you enter multiple key-value pairs, resources that contain the specified key-value pairs are returned.
 * *   This operation is used to query resource tags based on conditions. If no relationship matches the conditions, an empty list is returned.
 * *   You can query both user tags and visible system tags.
 * *   In addition to the required parameters, you can also specify ResourceId.N to query the visible resource tags of a specified resource in a region.
 * *   You can also specify Tag.N.Key to query the visible keys of a specified key in a region.
 * *   At least one of ResourceId.N, Tag.N.Key, and Tag.N.Value exists.
 * *   You can query tags of the same type or different types in a single operation.
 * *   You can query all your user types and visible system tags.
 *
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the visible resource tags.
 *
 * @description *   The Tag.N.Key and Tag.N.Value parameters constitute a key-value pair.
 * *   ResourceId.N must meet all the key-value pairs that are entered. If you enter multiple key-value pairs, resources that contain the specified key-value pairs are returned.
 * *   This operation is used to query resource tags based on conditions. If no relationship matches the conditions, an empty list is returned.
 * *   You can query both user tags and visible system tags.
 * *   In addition to the required parameters, you can also specify ResourceId.N to query the visible resource tags of a specified resource in a region.
 * *   You can also specify Tag.N.Key to query the visible keys of a specified key in a region.
 * *   At least one of ResourceId.N, Tag.N.Key, and Tag.N.Value exists.
 * *   You can query tags of the same type or different types in a single operation.
 * *   You can query all your user types and visible system tags.
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ModifyApiRequest {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='The type of the two-way communication API. Valid values:

*   **COMMON**: general APIs
*   **REGISTER**: registered APIs
*   **UNREGISTER**: unregistered APIs
*   **NOTIFY**: downstream notification', example='HmacSHA256'),
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='8afff6c8c4c6447abb035812e4d66b65'),
  apiName?: string(name='ApiName', description='The name of the API. The name must be unique within the API group. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (_).

This parameter is required.', example='ApiName'),
  appCodeAuthType?: string(name='AppCodeAuthType', description='The ID of the backend service.', example='DEFAULT'),
  authType?: string(name='AuthType', description='The configuration items of API requests sent by the consumer to API Gateway.', example='APP'),
  backendEnable?: boolean(name='BackendEnable', description='Configuration Mode', example='true'),
  backendId?: string(name='BackendId', description='Specifies whether to enable backend services.', example='0d105f80a8f340408bd34954d4e4ff22'),
  constantParameters?: string(name='ConstantParameters'),
  description?: string(name='Description', description='The description of the API. The description can be up to 180 characters in length.', example='Api description'),
  disableInternet?: boolean(name='DisableInternet', description='The AppCode authentication type supported. Valid values:

*   DEFAULT: supported after being made available in Alibaba Cloud Marketplace
*   DISABLE: not supported
*   HEADER : supported only in the Header parameter
*   HEADER_QUERY: supported in the Header or Query parameter', example='true'),
  errorCodeSamples?: string(name='ErrorCodeSamples'),
  failResultSample?: string(name='FailResultSample'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to set DisableInternet to **true** to limit API calls to within the VPC.
*   If you set DisableInternet to **false**, the limit if lifted.

>  If you do not set this parameter, the original value is used.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the API group.', example='927d50c0f2e54b359919923d908bb015'),
  openIdConnectConfig?: string(name='OpenIdConnectConfig', description='The client-side request signature method of the API. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='{\\\\"OpenIdApiType\\\\":\\\\"IDTOKEN\\\\",\\\\"PublicKey\\\\":\\\\"lzlj1573\\\\",\\\\"IdTokenParamName\\\\":\\\\"\\\\",\\\\"PublicKeyId\\\\":\\\\"lzljorders\\\\"}'),
  requestConfig?: string(name='RequestConfig', description='The configuration items of API requests sent by API Gateway to the backend service.

This parameter is required.', example='{"RequestProtocol":"HTTP","RequestHttpMethod":"GET","RequestPath":"/v3/getUserTest/[userId]","BodyFormat":"FORM","PostBodyDescription":""}'),
  requestParameters?: string(name='RequestParameters'),
  resultBodyModel?: string(name='ResultBodyModel', description='*   Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If you set **ForceNonceCheck** to **false**, the check is not performed. If you do not set this parameter, the original value is used.', example='{}'),
  resultDescriptions?: string(name='ResultDescriptions'),
  resultSample?: string(name='ResultSample'),
  resultType?: string(name='ResultType', description='The sample response from the backend service.', example='HTML'),
  securityToken?: string(name='SecurityToken'),
  serviceConfig?: string(name='ServiceConfig', description='The parameters of API requests sent by the consumer to API Gateway.

This parameter is required.', example='{"ServiceProtocol":"HTTP","ServiceHttpMethod":"GET","ServiceAddress":"http://www.customerdomain.com","ServiceTimeout":"1000","ServicePath":"/v3/getUserTest/[userId]"}'),
  serviceParameters?: string(name='ServiceParameters'),
  serviceParametersMap?: string(name='ServiceParametersMap'),
  systemParameters?: string(name='SystemParameters'),
  visibility?: string(name='Visibility', description='Specifies whether the API is public. Valid values:

*   **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.
*   **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.

This parameter is required.', example='PUBLIC'),
  webSocketApiType?: string(name='WebSocketApiType', description='The returned description of the API.', example='COMMON'),
}

model ModifyApiResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
}

model ModifyApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiResponseBody(name='body'),
}

/**
 * @summary Modifies the definition of an API.
 *
 * @description **This operation is intended for API providers.**
 * *   This API operation requires a full update. Updates of partial parameters are not supported.
 * *   When you modify an API name, make sure that the name of each API within the same group is unique.
 * *   When you modify the request path, make sure that each request path within the same group is unique.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiResponse
 */
async function modifyApiWithOptions(request: ModifyApiRequest, runtime: Util.RuntimeOptions): ModifyApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.allowSignatureMethod)) {
    query['AllowSignatureMethod'] = request.allowSignatureMethod;
  }
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appCodeAuthType)) {
    query['AppCodeAuthType'] = request.appCodeAuthType;
  }
  if (!Util.isUnset(request.authType)) {
    query['AuthType'] = request.authType;
  }
  if (!Util.isUnset(request.backendEnable)) {
    query['BackendEnable'] = request.backendEnable;
  }
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.disableInternet)) {
    query['DisableInternet'] = request.disableInternet;
  }
  if (!Util.isUnset(request.forceNonceCheck)) {
    query['ForceNonceCheck'] = request.forceNonceCheck;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.openIdConnectConfig)) {
    query['OpenIdConnectConfig'] = request.openIdConnectConfig;
  }
  if (!Util.isUnset(request.requestConfig)) {
    query['RequestConfig'] = request.requestConfig;
  }
  if (!Util.isUnset(request.resultBodyModel)) {
    query['ResultBodyModel'] = request.resultBodyModel;
  }
  if (!Util.isUnset(request.resultType)) {
    query['ResultType'] = request.resultType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.serviceConfig)) {
    query['ServiceConfig'] = request.serviceConfig;
  }
  if (!Util.isUnset(request.visibility)) {
    query['Visibility'] = request.visibility;
  }
  if (!Util.isUnset(request.webSocketApiType)) {
    query['WebSocketApiType'] = request.webSocketApiType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.constantParameters)) {
    body['ConstantParameters'] = request.constantParameters;
  }
  if (!Util.isUnset(request.errorCodeSamples)) {
    body['ErrorCodeSamples'] = request.errorCodeSamples;
  }
  if (!Util.isUnset(request.failResultSample)) {
    body['FailResultSample'] = request.failResultSample;
  }
  if (!Util.isUnset(request.requestParameters)) {
    body['RequestParameters'] = request.requestParameters;
  }
  if (!Util.isUnset(request.resultDescriptions)) {
    body['ResultDescriptions'] = request.resultDescriptions;
  }
  if (!Util.isUnset(request.resultSample)) {
    body['ResultSample'] = request.resultSample;
  }
  if (!Util.isUnset(request.serviceParameters)) {
    body['ServiceParameters'] = request.serviceParameters;
  }
  if (!Util.isUnset(request.serviceParametersMap)) {
    body['ServiceParametersMap'] = request.serviceParametersMap;
  }
  if (!Util.isUnset(request.systemParameters)) {
    body['SystemParameters'] = request.systemParameters;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the definition of an API.
 *
 * @description **This operation is intended for API providers.**
 * *   This API operation requires a full update. Updates of partial parameters are not supported.
 * *   When you modify an API name, make sure that the name of each API within the same group is unique.
 * *   When you modify the request path, make sure that each request path within the same group is unique.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyApiRequest
 * @return ModifyApiResponse
 */
async function modifyApi(request: ModifyApiRequest): ModifyApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiWithOptions(request, runtime);
}

model ModifyApiConfigurationRequest {
  allowSignatureMethod?: string(name='AllowSignatureMethod', description='If the **AuthType** parameter is set to **APP**, you must include this parameter to specify the signature algorithm. If you do not specify a value, HmacSHA256 is used by default. Valid values:

*   HmacSHA256
*   HmacSHA1,HmacSHA256', example='HmacSHA256'),
  apiId?: string(name='ApiId', description='The ID of the API.

This parameter is required.', example='baacc592e63a4cb6a41920d9d3f91f38'),
  apiName?: string(name='ApiName', description='The name of the API.', example='testModifyApiName'),
  appCodeAuthType?: string(name='AppCodeAuthType', description='If the **AuthType** parameter is set to **APP**, the valid values are:

*   **DEFAULT**: The default value that is used if no other values are passed. This value indicates that the settings of the group are used.
*   **DISABLE**: The authentication is disabled.
*   **HEADER**: AppCode can be placed in the Header parameter for authentication.
*   **HEADER_QUERY**: AppCode can be placed in the Header or Query parameter for authentication.', example='DEFAULT'),
  authType?: string(name='AuthType', description='API安全认证类型，目前可以取值：

- **APP**：只允许已授权的APP调用
- **ANONYMOUS**：允许匿名调用，设置为允许匿名调用需要注意：
     - 任何能够获取该API服务信息的人，都将能够调用该API。网关不会对调用者做身份认证，也无法设置按用户的流量控制，若开放该API请设置好按API的流量控制；
     - AppCodeAuthType的值不会生效。', example='APP'),
  backendName?: string(name='BackendName', description='The name of the backend service. This parameter takes effect only when the UseBackendService parameter is set to TRUE.', example='testBackendService'),
  bodyFormat?: string(name='BodyFormat', description='This parameter takes effect only when the **RequestMode** parameter is set to **MAPPING**.

The format in which data is transmitted to the server for POST and PUT requests. Valid values: **FORM** and **STREAM**. FORM indicates that data is transmitted in the key-value pair format. STREAM indicates that data is transmitted as byte streams.', example='STREAM'),
  bodyModel?: string(name='BodyModel', description='The body model.', example='https://apigateway.aliyun.com/models/f4e7333c****40dcbaf7c9da553ccd8d/3ab61f775b****d4bc35e993****87aa8'),
  contentTypeCategory?: string(name='ContentTypeCategory', description='The ContentType configuration of the backend request.

*   DEFAULT: the default configuration in API Gateway
*   CUSTOM: a custom configuration', example='DEFAULT'),
  contentTypeValue?: string(name='ContentTypeValue', description='The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.', example='application/x-www-form-urlencoded; charset=UTF-8'),
  description?: string(name='Description', description='The description of the API.', example='TestModifyDescription'),
  disableInternet?: boolean(name='DisableInternet', description='*   Specifies whether to call the API only in an internal network. If the **DisableInternet** parameter is set to **true**, the API can be called only in an internal network.
*   If the **DisableInternet** parameter is set to **false**, the API can be called over the Internet and in an internal network.', example='false'),
  errorCodeSamples?: string(name='ErrorCodeSamples', description='The sample error codes returned by the backend service.

For more information, see [ErrorCodeSample](https://help.aliyun.com/document_detail/44392.html).', example='[{"Code":"400","Message":"Missing the userId","Description":"param invalid"}]'),
  failResultSample?: string(name='FailResultSample', description='The sample error response from the backend service. This value is used only to generate documents. It does not affect the returned result.', example='{"errorCode":"fail","errorMessage":"param invalid"}'),
  forceNonceCheck?: boolean(name='ForceNonceCheck', description='*   Specifies whether to forcibly check X-Ca-Nonce. If the **ForceNonceCheck** parameter is set to **true**, X-Ca-Nonce is forcibly checked. X-Ca-Nonce is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
*   If the **ForceNonceCheck** parameter is set to **false**, X-Ca-Nonce is not checked. If you do not modify this parameter when you modify an API, the original value is used.', example='true'),
  functionComputeConfig?: string(name='FunctionComputeConfig', description='The Function Compute configuration.', example='{"FcType":"FCEvent","FcRegionId":"cn-hangzhou","RoleArn":"acs:ram::xxxxxxxx:role/aliyunserviceroleforapigateway","selectServiceName":"fcTest","FunctionName":"funcTest","selectFunctionName":"funcTest","Qualifier":"LATEST","Path":"","FcBaseUrl":"","ServiceName":"fcTest"}'),
  httpConfig?: string(name='HttpConfig', description='The HTTP configuration.', example='{"serviceAddress":"http://test.api.com","servicePath":"/test/api","serviceHttpMethod":"GET"}'),
  mockConfig?: string(name='MockConfig', description='The Mock configuration.', example='{"MockResult":"test","MockHeaders":[{"HeaderName":"testHeader","HeaderValue":"testHeader"}],"MockStatusCode":"400"}'),
  modelName?: string(name='ModelName', description='The name of the model.', example='Test'),
  ossConfig?: string(name='OssConfig', description='The OSS configuration.', example='{"OssRegionId":"cn-hangzhou","Key":"/test.html","BucketName":"test-api-oss","Action":"GetObject"}'),
  postBodyDescription?: string(name='PostBodyDescription', description='The description of the request body.', example='The description of the request body'),
  requestHttpMethod?: string(name='RequestHttpMethod', description='The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.', example='GET'),
  requestMode?: string(name='RequestMode', description='The request mode. Valid values:

*   MAPPING: Parameters are mapped. Unknown parameters are filtered out.
*   PASSTHROUGH: Parameters are passed through.
*   MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.', example='MAPPING'),
  requestParameters?: string(name='RequestParameters', description='The parameters of API requests sent by the consumer to API Gateway.

For more information, see [RequestParameter](https://help.aliyun.com/document_detail/43986.html).', example='[{"ParameterLocation":{"name":"Head","orderNumber":2},"ParameterType":"String","Required":"OPTIONAL","isHide":false,"ApiParameterName":"header1","DefaultValue":"123124","Location":"Head"},{"ParameterLocation":{"name":"Head","orderNumber":2},"ParameterType":"String","Required":"REQUIRED","isHide":false,"ApiParameterName":"header2","DefaultValue":"","Location":"Head"},{"ParameterLocation":{"name":"Query","orderNumber":3},"ParameterType":"String","Required":"OPTIONAL","isHide":false,"ApiParameterName":"query1","DefaultValue":"1245","Location":"Query"},{"ApiParameterName":"CaClientIp","ParameterLocation":{"name":"Query","orderNumber":0},"Location":"Query","ParameterType":"String","Required":"REQUIRED","Description":"ClientIP"},{"ApiParameterName":"testConstant","ParameterLocation":{"name":"Head","orderNumber":0},"Location":"Head","ParameterType":"String","Required":"REQUIRED","DefaultValue":"111"}]'),
  requestPath?: string(name='RequestPath', description='The path of the API request. If the complete API URL is `http://api.a.com:8080/object/add?key1=value1&key2=value2`, the path of the API request is `/object/add`.', example='/test/api'),
  requestProtocol?: string(name='RequestProtocol', description='The protocol type supported by the API. Valid values: HTTP and HTTPS. Separate multiple values with commas (,), such as "HTTP,HTTPS".', example='HTTP'),
  resultSample?: string(name='ResultSample', description='The sample response from the backend service. This value is used only to generate documents. It does not affect the returned result.', example='{\\\\n  \\\\"status\\\\": 0,\\\\n  \\\\"data\\\\": {\\\\n    \\\\"count\\\\": 1,\\\\n    \\\\"list\\\\": [\\\\n      \\\\"352\\\\"\\\\n    ]\\\\n  },\\\\n  \\\\"message\\\\": \\\\"success\\\\"\\\\n}'),
  resultType?: string(name='ResultType', description='The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML. This value is used only to generate documents. It does not affect the returned result.', example='JSON'),
  securityToken?: string(name='SecurityToken'),
  serviceParameters?: string(name='ServiceParameters', description='The parameters of API requests sent by API Gateway to the backend service.

For more information, see [ServiceParameter](https://help.aliyun.com/document_detail/43988.html).', example='[{"ServiceParameterName":"header1","Location":"Head","Type":"String","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"header2","Location":"Query","Type":"String","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"query1","Location":"Head","Type":"String","ParameterCatalog":"REQUEST"},{"ServiceParameterName":"ipp","Location":"Query","Type":"String","ParameterCatalog":"SYSTEM"},{"ServiceParameterName":"testConstant","Location":"Head","Type":"String","ParameterCatalog":"CONSTANT"}]'),
  serviceParametersMap?: string(name='ServiceParametersMap', description='The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.

For more information, see [ServiceParameterMap](https://help.aliyun.com/document_detail/43989.html).', example='[{"ServiceParameterName":"header1","RequestParameterName":"header1"},{"ServiceParameterName":"header2","RequestParameterName":"header2"},{"ServiceParameterName":"query1","RequestParameterName":"query1"},{"ServiceParameterName":"ipp","RequestParameterName":"CaClientIp"},{"ServiceParameterName":"testConstant","RequestParameterName":"testConstant"}]'),
  serviceProtocol?: string(name='ServiceProtocol', description='The protocol that is used to access backend services. Valid values:

*   Http: for backend services that use HTTP or HTTPS
*   Vpc: for backend services that use VPC
*   FC: for Function Compute
*   OSS: for Object Storage Service
*   Mock: for backend services that use the Mock mode
*   EventBridge: for EventBridge

You must specify the config value for the corresponding backend service.', example='HTTP'),
  serviceTimeout?: int32(name='ServiceTimeout', description='The timeout period of the backend service. Unit: milliseconds.', example='10000'),
  useBackendService?: boolean(name='UseBackendService', description='Specifies whether to use the information about the created backend service. Valid values:

*   TRUE: uses the information about the created backend service.
*   FALSE: uses the information about the custom backend service.', example='TRUE'),
  visibility?: string(name='Visibility', description='Specifies whether to make the API public. Valid values:

*   **PUBLIC:** The API is public. If this parameter is set to PUBLIC, the API is displayed on the APIs page for all users after the API is published to the production environment.
*   **PRIVATE:** The API is private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.', example='PUBLIC'),
  vpcConfig?: string(name='VpcConfig', description='The VPC configuration.', example='{"VpcId":"vpc-xxxxxxx","Name":"testVpc","InstanceId":"i-p0ssssss","Port":80,"servicePath":"/test/vpc","serviceHttpMethod":"HEAD"}'),
}

model ModifyApiConfigurationResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='6C87A26A-6A18-4B8E-8099-705278381A2C'),
}

model ModifyApiConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiConfigurationResponseBody(name='body'),
}

/**
 * @summary Modifies the draft definition of an API. This operation is different from the ModifyApi operation. This operation does not require all information about the API. You need to only specify the parameters that you want to modify. For example, if you want to change the authentication method of the API from Anonymous to APP, you specify APP as the value of AuthType and do not need to configure other parameters.
 *
 * @param request ModifyApiConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiConfigurationResponse
 */
async function modifyApiConfigurationWithOptions(request: ModifyApiConfigurationRequest, runtime: Util.RuntimeOptions): ModifyApiConfigurationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.allowSignatureMethod)) {
    query['AllowSignatureMethod'] = request.allowSignatureMethod;
  }
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appCodeAuthType)) {
    query['AppCodeAuthType'] = request.appCodeAuthType;
  }
  if (!Util.isUnset(request.authType)) {
    query['AuthType'] = request.authType;
  }
  if (!Util.isUnset(request.backendName)) {
    query['BackendName'] = request.backendName;
  }
  if (!Util.isUnset(request.bodyFormat)) {
    query['BodyFormat'] = request.bodyFormat;
  }
  if (!Util.isUnset(request.bodyModel)) {
    query['BodyModel'] = request.bodyModel;
  }
  if (!Util.isUnset(request.contentTypeCategory)) {
    query['ContentTypeCategory'] = request.contentTypeCategory;
  }
  if (!Util.isUnset(request.contentTypeValue)) {
    query['ContentTypeValue'] = request.contentTypeValue;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.disableInternet)) {
    query['DisableInternet'] = request.disableInternet;
  }
  if (!Util.isUnset(request.errorCodeSamples)) {
    query['ErrorCodeSamples'] = request.errorCodeSamples;
  }
  if (!Util.isUnset(request.failResultSample)) {
    query['FailResultSample'] = request.failResultSample;
  }
  if (!Util.isUnset(request.forceNonceCheck)) {
    query['ForceNonceCheck'] = request.forceNonceCheck;
  }
  if (!Util.isUnset(request.functionComputeConfig)) {
    query['FunctionComputeConfig'] = request.functionComputeConfig;
  }
  if (!Util.isUnset(request.httpConfig)) {
    query['HttpConfig'] = request.httpConfig;
  }
  if (!Util.isUnset(request.mockConfig)) {
    query['MockConfig'] = request.mockConfig;
  }
  if (!Util.isUnset(request.modelName)) {
    query['ModelName'] = request.modelName;
  }
  if (!Util.isUnset(request.ossConfig)) {
    query['OssConfig'] = request.ossConfig;
  }
  if (!Util.isUnset(request.postBodyDescription)) {
    query['PostBodyDescription'] = request.postBodyDescription;
  }
  if (!Util.isUnset(request.requestHttpMethod)) {
    query['RequestHttpMethod'] = request.requestHttpMethod;
  }
  if (!Util.isUnset(request.requestMode)) {
    query['RequestMode'] = request.requestMode;
  }
  if (!Util.isUnset(request.requestParameters)) {
    query['RequestParameters'] = request.requestParameters;
  }
  if (!Util.isUnset(request.requestPath)) {
    query['RequestPath'] = request.requestPath;
  }
  if (!Util.isUnset(request.requestProtocol)) {
    query['RequestProtocol'] = request.requestProtocol;
  }
  if (!Util.isUnset(request.resultSample)) {
    query['ResultSample'] = request.resultSample;
  }
  if (!Util.isUnset(request.resultType)) {
    query['ResultType'] = request.resultType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.serviceParameters)) {
    query['ServiceParameters'] = request.serviceParameters;
  }
  if (!Util.isUnset(request.serviceParametersMap)) {
    query['ServiceParametersMap'] = request.serviceParametersMap;
  }
  if (!Util.isUnset(request.serviceProtocol)) {
    query['ServiceProtocol'] = request.serviceProtocol;
  }
  if (!Util.isUnset(request.serviceTimeout)) {
    query['ServiceTimeout'] = request.serviceTimeout;
  }
  if (!Util.isUnset(request.useBackendService)) {
    query['UseBackendService'] = request.useBackendService;
  }
  if (!Util.isUnset(request.visibility)) {
    query['Visibility'] = request.visibility;
  }
  if (!Util.isUnset(request.vpcConfig)) {
    query['VpcConfig'] = request.vpcConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiConfiguration',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the draft definition of an API. This operation is different from the ModifyApi operation. This operation does not require all information about the API. You need to only specify the parameters that you want to modify. For example, if you want to change the authentication method of the API from Anonymous to APP, you specify APP as the value of AuthType and do not need to configure other parameters.
 *
 * @param request ModifyApiConfigurationRequest
 * @return ModifyApiConfigurationResponse
 */
async function modifyApiConfiguration(request: ModifyApiConfigurationRequest): ModifyApiConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiConfigurationWithOptions(request, runtime);
}

model ModifyApiGroupRequest {
  basePath?: string(name='BasePath', description='The root path of the API.', example='/eeee'),
  compatibleFlags?: string(name='CompatibleFlags', description='The list of associated tags. Separate multiple tags with commas (,).', example='depart:dep1'),
  customAppCodeConfig?: string(name='CustomAppCodeConfig', description='The custom appcode configuration.', example='{"location":"HEADER","name":"myAppCodeHeader"}'),
  customTraceConfig?: string(name='CustomTraceConfig', description='The custom trace configuration.', example='{\\\\"parameterLocation\\\\":\\\\"HEADER\\\\",\\\\"parameterName\\\\":\\\\"traceId\\\\"}'),
  customerConfigs?: string(name='CustomerConfigs', description='The data of custom configuration items.', example='removeResponseServerHeader'),
  defaultDomain?: string(name='DefaultDomain', description='The default domain name.', example='mkt.api.gaore.com'),
  description?: string(name='Description', description='The API group description that you want to specify, which cannot exceed 180 characters. If this parameter is not specified, the group description is not modified.', example='New weather informations.'),
  filterAppCodeForBackend?: string(name='FilterAppCodeForBackend', description='If filter AppCode for backend.', example='false'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  groupName?: string(name='GroupName', description='The API group name must be globally unique. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (_). If this parameter is not specified, the group name is not modified.', example='NewWeather'),
  passthroughHeaders?: string(name='PassthroughHeaders', description='Specifies whether to pass headers.', example='eagleeye-rpcid,x-b3-traceid,host'),
  rpcPattern?: string(name='RpcPattern', description='The RPC mode.', example='{}'),
  rpsLimitForServerless?: string(name='RpsLimitForServerless'),
  securityToken?: string(name='SecurityToken'),
  supportSSE?: string(name='SupportSSE', description='If support SSE.', example='true', nullable=true),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

This parameter is required.', example='env'),
      value?: string(name='Value', description='The value of the tag.

This parameter is required.', example='uat'),
    }
  ](name='Tag', description='The object tags that match the lifecycle rule. You can specify multiple tags.', example='Key， Value'),
  userLogConfig?: string(name='UserLogConfig', description='The user log configuration.', example='{\\\\"requestBody\\\\":false,\\\\"responseBody\\\\":false,\\\\"queryString\\\\":\\\\"\\\\",\\\\"requestHeaders\\\\":\\\\"\\\\",\\\\"responseHeaders\\\\":\\\\"\\\\",\\\\"jwtClaims\\\\":\\\\"\\\\"}'),
}

model ModifyApiGroupResponseBody = {
  basePath?: string(name='BasePath', description='The root path of the API.', example='/test'),
  description?: string(name='Description', description='The description of the API group.', example='New weather informations.'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  groupName?: string(name='GroupName', description='The name of the group to which an API belongs.', example='NewWeather'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4CF287C6-CE5B-477B-BE27-C48F99EADBC8'),
  subDomain?: string(name='SubDomain', description='The second-level domain name automatically assigned to the API group.', example='523e8dc7bbe04613b5b1d726c2a7889d-cn-hangzhou.alicloudapi.com'),
}

model ModifyApiGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiGroupResponseBody(name='body'),
}

/**
 * @summary Modifies the name, description, or basepath of an existing API group.
 *
 * @description *   This operation is intended for API providers.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyApiGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiGroupResponse
 */
async function modifyApiGroupWithOptions(request: ModifyApiGroupRequest, runtime: Util.RuntimeOptions): ModifyApiGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.basePath)) {
    query['BasePath'] = request.basePath;
  }
  if (!Util.isUnset(request.compatibleFlags)) {
    query['CompatibleFlags'] = request.compatibleFlags;
  }
  if (!Util.isUnset(request.customAppCodeConfig)) {
    query['CustomAppCodeConfig'] = request.customAppCodeConfig;
  }
  if (!Util.isUnset(request.customTraceConfig)) {
    query['CustomTraceConfig'] = request.customTraceConfig;
  }
  if (!Util.isUnset(request.customerConfigs)) {
    query['CustomerConfigs'] = request.customerConfigs;
  }
  if (!Util.isUnset(request.defaultDomain)) {
    query['DefaultDomain'] = request.defaultDomain;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.filterAppCodeForBackend)) {
    query['FilterAppCodeForBackend'] = request.filterAppCodeForBackend;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.passthroughHeaders)) {
    query['PassthroughHeaders'] = request.passthroughHeaders;
  }
  if (!Util.isUnset(request.rpcPattern)) {
    query['RpcPattern'] = request.rpcPattern;
  }
  if (!Util.isUnset(request.rpsLimitForServerless)) {
    query['RpsLimitForServerless'] = request.rpsLimitForServerless;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.supportSSE)) {
    query['SupportSSE'] = request.supportSSE;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.userLogConfig)) {
    query['UserLogConfig'] = request.userLogConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the name, description, or basepath of an existing API group.
 *
 * @description *   This operation is intended for API providers.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyApiGroupRequest
 * @return ModifyApiGroupResponse
 */
async function modifyApiGroup(request: ModifyApiGroupRequest): ModifyApiGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiGroupWithOptions(request, runtime);
}

model ModifyApiGroupInstanceRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='01c97ed08a614118849b00079753d1e2'),
  remark?: string(name='Remark', description='The remarks.', example='migrate'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.

This parameter is required.', example='env'),
      value?: string(name='Value', description='The tag value.

This parameter is required.', example='123'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
  targetInstanceId?: string(name='TargetInstanceId', description='The ID of the instance to which you want to migrate the API group.

This parameter is required.', example='apigateway-bj-c325375b1ebe'),
}

model ModifyApiGroupInstanceResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='E07AEFF0-9FB0-599E-8F12-B418D8AE1F3D'),
}

model ModifyApiGroupInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiGroupInstanceResponseBody(name='body'),
}

/**
 * @summary 变更分组实例
 *
 * @param request ModifyApiGroupInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiGroupInstanceResponse
 */
async function modifyApiGroupInstanceWithOptions(request: ModifyApiGroupInstanceRequest, runtime: Util.RuntimeOptions): ModifyApiGroupInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.targetInstanceId)) {
    query['TargetInstanceId'] = request.targetInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiGroupInstance',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 变更分组实例
 *
 * @param request ModifyApiGroupInstanceRequest
 * @return ModifyApiGroupInstanceResponse
 */
async function modifyApiGroupInstance(request: ModifyApiGroupInstanceRequest): ModifyApiGroupInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiGroupInstanceWithOptions(request, runtime);
}

model ModifyApiGroupNetworkPolicyRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='b0162c75d7d34ff48506f1aff878b05e'),
  httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS security policy.', example='HTTPS1_1_TLS1_0'),
  innerDomainEnable?: boolean(name='InnerDomainEnable', description='Specifies whether to disable the public second-level domain name.', example='true'),
  internetEnable?: boolean(name='InternetEnable', description='Specifies whether to enable the virtual private cloud (VPC) second-level domain name.', example='true'),
  internetIPV6Enable?: boolean(name='InternetIPV6Enable', description='Specifies whether to enable IPv6. Valid values: **true** and **false**.', example='true'),
  securityToken?: string(name='SecurityToken'),
  vpcIntranetEnable?: boolean(name='VpcIntranetEnable', description='Specifies whether to enable the VPC domain name. Valid values:

*   TRUE
*   FALSE', example='false'),
  vpcSlbIntranetEnable?: boolean(name='VpcSlbIntranetEnable', description='Specifies whether to enable the self-calling domain name.', example='false'),
}

model ModifyApiGroupNetworkPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='4E707B25-5119-5ACF-9D26-7D2A2762F05C'),
}

model ModifyApiGroupNetworkPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiGroupNetworkPolicyResponseBody(name='body'),
}

/**
 * @summary Modifies the network policy of an API group.
 *
 * @param request ModifyApiGroupNetworkPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiGroupNetworkPolicyResponse
 */
async function modifyApiGroupNetworkPolicyWithOptions(request: ModifyApiGroupNetworkPolicyRequest, runtime: Util.RuntimeOptions): ModifyApiGroupNetworkPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.httpsPolicy)) {
    query['HttpsPolicy'] = request.httpsPolicy;
  }
  if (!Util.isUnset(request.innerDomainEnable)) {
    query['InnerDomainEnable'] = request.innerDomainEnable;
  }
  if (!Util.isUnset(request.internetEnable)) {
    query['InternetEnable'] = request.internetEnable;
  }
  if (!Util.isUnset(request.internetIPV6Enable)) {
    query['InternetIPV6Enable'] = request.internetIPV6Enable;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcIntranetEnable)) {
    query['VpcIntranetEnable'] = request.vpcIntranetEnable;
  }
  if (!Util.isUnset(request.vpcSlbIntranetEnable)) {
    query['VpcSlbIntranetEnable'] = request.vpcSlbIntranetEnable;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiGroupNetworkPolicy',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the network policy of an API group.
 *
 * @param request ModifyApiGroupNetworkPolicyRequest
 * @return ModifyApiGroupNetworkPolicyResponse
 */
async function modifyApiGroupNetworkPolicy(request: ModifyApiGroupNetworkPolicyRequest): ModifyApiGroupNetworkPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiGroupNetworkPolicyWithOptions(request, runtime);
}

model ModifyApiGroupVpcWhitelistRequest {
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='9b80408147724ddab4c4e2703c6ca019'),
  securityToken?: string(name='SecurityToken'),
  vpcIds?: string(name='VpcIds', description='The ID of the VPC instance.

This parameter is required.', example='vpc-bp11w979o2s9rcr962w25'),
}

model ModifyApiGroupVpcWhitelistResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='F8B9DC8C-D6E2-5065-BD1F-0401866E7F10'),
}

model ModifyApiGroupVpcWhitelistResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiGroupVpcWhitelistResponseBody(name='body'),
}

/**
 * @summary Modifies the VPC whitelist of an API group.
 *
 * @param request ModifyApiGroupVpcWhitelistRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiGroupVpcWhitelistResponse
 */
async function modifyApiGroupVpcWhitelistWithOptions(request: ModifyApiGroupVpcWhitelistRequest, runtime: Util.RuntimeOptions): ModifyApiGroupVpcWhitelistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcIds)) {
    query['VpcIds'] = request.vpcIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiGroupVpcWhitelist',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the VPC whitelist of an API group.
 *
 * @param request ModifyApiGroupVpcWhitelistRequest
 * @return ModifyApiGroupVpcWhitelistResponse
 */
async function modifyApiGroupVpcWhitelist(request: ModifyApiGroupVpcWhitelistRequest): ModifyApiGroupVpcWhitelistResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiGroupVpcWhitelistWithOptions(request, runtime);
}

model ModifyAppRequest {
  appId?: long(name='AppId', description='The ID of the app.

This parameter is required.', example='20112314518278'),
  appName?: string(name='AppName', description='The value must be 4 to 26 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.

This parameter is required only when you want to modify the value.', example='jiedian_pord'),
  description?: string(name='Description', description='The description of the app. The description can contain a maximum of 180 characters in length.

This parameter is required only when you want to modify the value.', example='modidyTest'),
  extend?: string(name='Extend', description='扩展信息', example='110461946884'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The value of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='key'),
      value?: string(name='Value', description='The value of the tag.

N can be an integer from 1 to 20.``', example='value'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model ModifyAppResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model ModifyAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppResponseBody(name='body'),
}

/**
 * @summary Modifies a specified app.
 *
 * @description *   This operation is intended for API callers.
 * *   AppName or Description can be modified. If these parameters are not specified, no modifications are made and the operation will directly return a successful response.********
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppResponse
 */
async function modifyAppWithOptions(request: ModifyAppRequest, runtime: Util.RuntimeOptions): ModifyAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.extend)) {
    query['Extend'] = request.extend;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a specified app.
 *
 * @description *   This operation is intended for API callers.
 * *   AppName or Description can be modified. If these parameters are not specified, no modifications are made and the operation will directly return a successful response.********
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyAppRequest
 * @return ModifyAppResponse
 */
async function modifyApp(request: ModifyAppRequest): ModifyAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAppWithOptions(request, runtime);
}

model ModifyBackendRequest {
  backendId?: string(name='BackendId', description='This parameter is required.', example='20bcdc9453524b78a8beb1f6de21edb7'),
  backendName?: string(name='BackendName', description='This parameter is required.', example='testHttpModify'),
  backendType?: string(name='BackendType', description='This parameter is required.', example='HTTP'),
  description?: string(name='Description', example='test'),
  securityToken?: string(name='SecurityToken'),
}

model ModifyBackendResponseBody = {
  requestId?: string(name='RequestId', example='06DACA61-9359-5EC6-AEDA-C73E620E49A9'),
}

model ModifyBackendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBackendResponseBody(name='body'),
}

/**
 * @summary 修改后端服务
 *
 * @param request ModifyBackendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBackendResponse
 */
async function modifyBackendWithOptions(request: ModifyBackendRequest, runtime: Util.RuntimeOptions): ModifyBackendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.backendName)) {
    query['BackendName'] = request.backendName;
  }
  if (!Util.isUnset(request.backendType)) {
    query['BackendType'] = request.backendType;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBackend',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改后端服务
 *
 * @param request ModifyBackendRequest
 * @return ModifyBackendResponse
 */
async function modifyBackend(request: ModifyBackendRequest): ModifyBackendResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBackendWithOptions(request, runtime);
}

model ModifyBackendModelRequest {
  backendId?: string(name='BackendId', example='20bcdc9453524b78a8beb1f6de21edb7'),
  backendModelData?: string(name='BackendModelData', example='{\\\\"ServiceAddress\\\\":\\\\"http://121.40.XX.XX\\\\"}'),
  backendModelId?: string(name='BackendModelId', example='3bb6375bc71c4e4c95ce05b4e7a55a9d'),
  backendType?: string(name='BackendType', example='OSS'),
  description?: string(name='Description', example='modify plugin first'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', example='TEST'),
}

model ModifyBackendModelResponseBody = {
  operationId?: string(name='OperationId', example='c16a1880f5164d779f6a54f64d997cd9'),
  requestId?: string(name='RequestId', example='19B89B04-418B-55EE-94A8-6B42CA06002A'),
}

model ModifyBackendModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBackendModelResponseBody(name='body'),
}

/**
 * @summary 修改后端服务在环境上的定义
 *
 * @param request ModifyBackendModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBackendModelResponse
 */
async function modifyBackendModelWithOptions(request: ModifyBackendModelRequest, runtime: Util.RuntimeOptions): ModifyBackendModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendId)) {
    query['BackendId'] = request.backendId;
  }
  if (!Util.isUnset(request.backendModelData)) {
    query['BackendModelData'] = request.backendModelData;
  }
  if (!Util.isUnset(request.backendModelId)) {
    query['BackendModelId'] = request.backendModelId;
  }
  if (!Util.isUnset(request.backendType)) {
    query['BackendType'] = request.backendType;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBackendModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改后端服务在环境上的定义
 *
 * @param request ModifyBackendModelRequest
 * @return ModifyBackendModelResponse
 */
async function modifyBackendModel(request: ModifyBackendModelRequest): ModifyBackendModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBackendModelWithOptions(request, runtime);
}

model ModifyDatasetRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  datasetName?: string(name='DatasetName', description='The name of the dataset.

This parameter is required.', example='NewDatasetName'),
  securityToken?: string(name='SecurityToken'),
}

model ModifyDatasetResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876********'),
}

model ModifyDatasetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDatasetResponseBody(name='body'),
}

/**
 * @summary Modifies the name of a custom dataset.
 *
 * @param request ModifyDatasetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDatasetResponse
 */
async function modifyDatasetWithOptions(request: ModifyDatasetRequest, runtime: Util.RuntimeOptions): ModifyDatasetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.datasetName)) {
    query['DatasetName'] = request.datasetName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDataset',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the name of a custom dataset.
 *
 * @param request ModifyDatasetRequest
 * @return ModifyDatasetResponse
 */
async function modifyDataset(request: ModifyDatasetRequest): ModifyDatasetResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDatasetWithOptions(request, runtime);
}

model ModifyDatasetItemRequest {
  datasetId?: string(name='DatasetId', description='The ID of the dataset.

This parameter is required.', example='a25a6589b2584ff490e891cc********'),
  datasetItemId?: string(name='DatasetItemId', description='The ID of the data entry.

This parameter is required.', example='5045****'),
  description?: string(name='Description', description='The description of the data entry. The description cannot exceed 180 characters in length.', example='description'),
  expiredTime?: string(name='ExpiredTime', description='The time in UTC when the data entry expires. The time is in the **yyyy-MM-ddTHH:mm:ssZ** format.', example='2022-09-22T12:00:00Z'),
  securityToken?: string(name='SecurityToken'),
}

model ModifyDatasetItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='F7DE77BC-0F7D-5A18-B494-BD2C********'),
}

model ModifyDatasetItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDatasetItemResponseBody(name='body'),
}

/**
 * @summary Modifies the expiration time and description of a data entry in a custom dataset.
 *
 * @param request ModifyDatasetItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDatasetItemResponse
 */
async function modifyDatasetItemWithOptions(request: ModifyDatasetItemRequest, runtime: Util.RuntimeOptions): ModifyDatasetItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  if (!Util.isUnset(request.datasetItemId)) {
    query['DatasetItemId'] = request.datasetItemId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.expiredTime)) {
    query['ExpiredTime'] = request.expiredTime;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDatasetItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the expiration time and description of a data entry in a custom dataset.
 *
 * @param request ModifyDatasetItemRequest
 * @return ModifyDatasetItemResponse
 */
async function modifyDatasetItem(request: ModifyDatasetItemRequest): ModifyDatasetItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDatasetItemWithOptions(request, runtime);
}

model ModifyInstanceAttributeRequest {
  deleteVpcIpBlock?: string(name='DeleteVpcIpBlock', description='If delete VPC Ip block.', example='true'),
  egressIpv6Enable?: string(name='EgressIpv6Enable', description='If enable outbound IPv6 Traffic.', example='true'),
  httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS policy.', example='HTTPS2_TLS1_0'),
  IPV6Enabled?: string(name='IPV6Enabled', description='If enable inbound IPv6 Traffic.', example='true'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-ht-8xxxxxxxxx'),
  instanceName?: string(name='InstanceName', description='Instance Name', example='apigatewayInstance'),
  intranetSegments?: string(name='IntranetSegments', description='Custom private CIDR block.', example='172.0.0.1/24'),
  maintainEndTime?: string(name='MaintainEndTime', description='Maintainable end time.', example='23:00Z'),
  maintainStartTime?: string(name='MaintainStartTime', description='Maintainable start time.', example='18:00Z'),
  toConnectVpcIpBlock?: {
    cidrBlock?: string(name='CidrBlock', description='The CIDR block of the VSwitch.', example='172.16.0.0/16'),
    customized?: boolean(name='Customized', description='Specifies whether the CIDR block is a custom CIDR block.', example='false'),
    vswitchId?: string(name='VswitchId', description='The vSwitch ID.', example='vsw-wz94cqvaoe1ipxxxxxx'),
    zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-hangzhou-a'),
  }(name='ToConnectVpcIpBlock', description='The information about the CIDR block that API Gateway can use to access the virtual private cloud (VPC) of the backend service.'),
  token?: string(name='Token', description='The token of the request.', example='c20d86c4-1eb3-4d0b-afe9-c586df1e2136'),
  vpcSlbIntranetEnable?: string(name='VpcSlbIntranetEnable', description='Specifies whether to enable the self-calling domain name.', example='false'),
}

model ModifyInstanceAttributeShrinkRequest {
  deleteVpcIpBlock?: string(name='DeleteVpcIpBlock', description='If delete VPC Ip block.', example='true'),
  egressIpv6Enable?: string(name='EgressIpv6Enable', description='If enable outbound IPv6 Traffic.', example='true'),
  httpsPolicy?: string(name='HttpsPolicy', description='The HTTPS policy.', example='HTTPS2_TLS1_0'),
  IPV6Enabled?: string(name='IPV6Enabled', description='If enable inbound IPv6 Traffic.', example='true'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-ht-8xxxxxxxxx'),
  instanceName?: string(name='InstanceName', description='Instance Name', example='apigatewayInstance'),
  intranetSegments?: string(name='IntranetSegments', description='Custom private CIDR block.', example='172.0.0.1/24'),
  maintainEndTime?: string(name='MaintainEndTime', description='Maintainable end time.', example='23:00Z'),
  maintainStartTime?: string(name='MaintainStartTime', description='Maintainable start time.', example='18:00Z'),
  toConnectVpcIpBlockShrink?: string(name='ToConnectVpcIpBlock', description='The information about the CIDR block that API Gateway can use to access the virtual private cloud (VPC) of the backend service.'),
  token?: string(name='Token', description='The token of the request.', example='c20d86c4-1eb3-4d0b-afe9-c586df1e2136'),
  vpcSlbIntranetEnable?: string(name='VpcSlbIntranetEnable', description='Specifies whether to enable the self-calling domain name.', example='false'),
}

model ModifyInstanceAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='F3186326-2C57-58E1-B6E9-XXXXXXXXXXXX'),
}

model ModifyInstanceAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyInstanceAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the properties of an API Gateway instance.
 *
 * @param tmpReq ModifyInstanceAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyInstanceAttributeResponse
 */
async function modifyInstanceAttributeWithOptions(tmpReq: ModifyInstanceAttributeRequest, runtime: Util.RuntimeOptions): ModifyInstanceAttributeResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyInstanceAttributeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.toConnectVpcIpBlock)) {
    request.toConnectVpcIpBlockShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.toConnectVpcIpBlock, 'ToConnectVpcIpBlock', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.deleteVpcIpBlock)) {
    query['DeleteVpcIpBlock'] = request.deleteVpcIpBlock;
  }
  if (!Util.isUnset(request.egressIpv6Enable)) {
    query['EgressIpv6Enable'] = request.egressIpv6Enable;
  }
  if (!Util.isUnset(request.httpsPolicy)) {
    query['HttpsPolicy'] = request.httpsPolicy;
  }
  if (!Util.isUnset(request.IPV6Enabled)) {
    query['IPV6Enabled'] = request.IPV6Enabled;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceName)) {
    query['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.intranetSegments)) {
    query['IntranetSegments'] = request.intranetSegments;
  }
  if (!Util.isUnset(request.maintainEndTime)) {
    query['MaintainEndTime'] = request.maintainEndTime;
  }
  if (!Util.isUnset(request.maintainStartTime)) {
    query['MaintainStartTime'] = request.maintainStartTime;
  }
  if (!Util.isUnset(request.toConnectVpcIpBlockShrink)) {
    query['ToConnectVpcIpBlock'] = request.toConnectVpcIpBlockShrink;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  if (!Util.isUnset(request.vpcSlbIntranetEnable)) {
    query['VpcSlbIntranetEnable'] = request.vpcSlbIntranetEnable;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstanceAttribute',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the properties of an API Gateway instance.
 *
 * @param request ModifyInstanceAttributeRequest
 * @return ModifyInstanceAttributeResponse
 */
async function modifyInstanceAttribute(request: ModifyInstanceAttributeRequest): ModifyInstanceAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceAttributeWithOptions(request, runtime);
}

model ModifyInstanceSpecRequest {
  autoPay?: boolean(name='AutoPay', description='Specifies whether payment is automatically made during renewal. Valid values:

*   **True**: Automatic payment is enabled. Make sure that your Alibaba Cloud account has adequate balance.
*   **False**: Automatic payment is disabled. You have to manually pay in the console. Log on to the console. In the upper-right corner, choose **Expenses > User Center**. In the left-side navigation pane, click **Orders**. On the page that appears, find your order and complete the payment.

Default value: **False**.', example='true'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-cn-v6419k43xxxxx'),
  instanceSpec?: string(name='InstanceSpec', description='The specifications of the instance.

This parameter is required.', example='api.s1.small'),
  modifyAction?: string(name='ModifyAction', description='Specifies whether to upgrade or downgrade the instance. Valid values:

*   **UPGRADE**
*   **DOWNGRADE**

Default value: **UPGRADE**.', example='UPGRADE'),
  skipWaitSwitch?: boolean(name='SkipWaitSwitch', description='Specifies whether to skip the Waiting for Traffic Switchover state. During the upgrade or downgrade, a new outbound IP address may be added to the API Gateway instance. The Waiting for Traffic Switchover state is used to remind users of adding the new outbound IP address to the whitelist. If you set the SkipWaitSwitch parameter to true, the instance does not enter the Waiting for Traffic Switchover state when a new outbound IP address is available. Instead, the system sends internal messages to the user.', example='false'),
  token?: string(name='Token', description='The password.

This parameter is required.', example='b5845042-2f2f-4e96-bd5c-36c6e5c2a68c'),
}

model ModifyInstanceSpecResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='36BBBAD4-1CFB-489F-841A-8CA52EEA787E'),
}

model ModifyInstanceSpecResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyInstanceSpecResponseBody(name='body'),
}

/**
 * @summary Upgrades or downgrades the configurations of an API Gateway instance.
 *
 * @param request ModifyInstanceSpecRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyInstanceSpecResponse
 */
async function modifyInstanceSpecWithOptions(request: ModifyInstanceSpecRequest, runtime: Util.RuntimeOptions): ModifyInstanceSpecResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceSpec)) {
    query['InstanceSpec'] = request.instanceSpec;
  }
  if (!Util.isUnset(request.modifyAction)) {
    query['ModifyAction'] = request.modifyAction;
  }
  if (!Util.isUnset(request.skipWaitSwitch)) {
    query['SkipWaitSwitch'] = request.skipWaitSwitch;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstanceSpec',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Upgrades or downgrades the configurations of an API Gateway instance.
 *
 * @param request ModifyInstanceSpecRequest
 * @return ModifyInstanceSpecResponse
 */
async function modifyInstanceSpec(request: ModifyInstanceSpecRequest): ModifyInstanceSpecResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceSpecWithOptions(request, runtime);
}

model ModifyInstanceVpcAttributeForConsoleRequest {
  deleteVpcAccess?: boolean(name='DeleteVpcAccess', description='Whether delete instance client VPC.
- FALSE: set or modify instance client VPC
- TRUE: delete instance client VPC', example='false'),
  instanceId?: string(name='InstanceId', description='The ID of the instance.

This parameter is required.', example='apigateway-bj-f28baxxxxb51'),
  token?: string(name='Token', description='The token of the request.', example='505959c38776d9324945dbff709582'),
  vpcId?: string(name='VpcId', description='The ID of the VPC.

This parameter is required.', example='vpc-8vbnnd66xxxx2xb5oig4f'),
  vpcOwnerId?: long(name='VpcOwnerId', description='The ID of the Alibaba Cloud account to which the VPC belongs.', example='1121011712128923'),
  vswitchId?: string(name='VswitchId', description='The ID of the vSwitch.', example='vsw-bj9e2i8w3wz7shkvnuj9a'),
}

model ModifyInstanceVpcAttributeForConsoleResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D08741CF-BE59-5DA6-B06F-BB65173110C0'),
}

model ModifyInstanceVpcAttributeForConsoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyInstanceVpcAttributeForConsoleResponseBody(name='body'),
}

/**
 * @summary Modify instance client VPC config.
 *
 * @param request ModifyInstanceVpcAttributeForConsoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyInstanceVpcAttributeForConsoleResponse
 */
async function modifyInstanceVpcAttributeForConsoleWithOptions(request: ModifyInstanceVpcAttributeForConsoleRequest, runtime: Util.RuntimeOptions): ModifyInstanceVpcAttributeForConsoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deleteVpcAccess)) {
    query['DeleteVpcAccess'] = request.deleteVpcAccess;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vpcOwnerId)) {
    query['VpcOwnerId'] = request.vpcOwnerId;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyInstanceVpcAttributeForConsole',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modify instance client VPC config.
 *
 * @param request ModifyInstanceVpcAttributeForConsoleRequest
 * @return ModifyInstanceVpcAttributeForConsoleResponse
 */
async function modifyInstanceVpcAttributeForConsole(request: ModifyInstanceVpcAttributeForConsoleRequest): ModifyInstanceVpcAttributeForConsoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyInstanceVpcAttributeForConsoleWithOptions(request, runtime);
}

model ModifyIntranetDomainPolicyRequest {
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  vpcIntranetEnable?: boolean(name='VpcIntranetEnable', description='Specifies whether to enable the VPC domain name. Valid values:

*   TRUE
*   FALSE

This parameter is required.', example='true'),
}

model ModifyIntranetDomainPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model ModifyIntranetDomainPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyIntranetDomainPolicyResponseBody(name='body'),
}

/**
 * @summary Modifies the VPC domain name policy of an API group.
 *
 * @param request ModifyIntranetDomainPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyIntranetDomainPolicyResponse
 */
async function modifyIntranetDomainPolicyWithOptions(request: ModifyIntranetDomainPolicyRequest, runtime: Util.RuntimeOptions): ModifyIntranetDomainPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcIntranetEnable)) {
    query['VpcIntranetEnable'] = request.vpcIntranetEnable;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIntranetDomainPolicy',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the VPC domain name policy of an API group.
 *
 * @param request ModifyIntranetDomainPolicyRequest
 * @return ModifyIntranetDomainPolicyResponse
 */
async function modifyIntranetDomainPolicy(request: ModifyIntranetDomainPolicyRequest): ModifyIntranetDomainPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIntranetDomainPolicyWithOptions(request, runtime);
}

model ModifyIpControlRequest {
  description?: string(name='Description', description='The description. The description can be up to 200 characters in length.', example='description'),
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.

This parameter is required.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  ipControlName?: string(name='IpControlName', description='The name of the ACL. The name must be 4 to 50 characters in length, and can contain letters, digits, and underscores (_). The name cannot start with an underscore (_).', example='testControl11'),
  securityToken?: string(name='SecurityToken'),
}

model ModifyIpControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model ModifyIpControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyIpControlResponseBody(name='body'),
}

/**
 * @summary Modifies an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   This operation allows you to modify only the name and description of an ACL. You cannot modify the type of the ACL.
 *
 * @param request ModifyIpControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyIpControlResponse
 */
async function modifyIpControlWithOptions(request: ModifyIpControlRequest, runtime: Util.RuntimeOptions): ModifyIpControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.ipControlName)) {
    query['IpControlName'] = request.ipControlName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIpControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   This operation allows you to modify only the name and description of an ACL. You cannot modify the type of the ACL.
 *
 * @param request ModifyIpControlRequest
 * @return ModifyIpControlResponse
 */
async function modifyIpControl(request: ModifyIpControlRequest): ModifyIpControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIpControlWithOptions(request, runtime);
}

model ModifyIpControlPolicyItemRequest {
  appId?: string(name='AppId', description='The ID of the application that is restricted by the policy. You can configure the AppId parameter only when the value of the IpControlType parameter is ALLOW.

*   You can add only one application ID at a time.
*   If this parameter is empty, no applications are restricted.
*   If this parameter is not empty, not only IP addresses but also applications are restricted.
*   If this parameter is not empty and no security authentication method is specified for the API, all API calls are restricted.
*   If the value of the IpControlType parameter is REFUSE and the AppId parameter is not empty, API Gateway automatically ignores the AppId parameter and restricts only the IP addresses.', example='123'),
  cidrIp?: string(name='CidrIp', description='The IP address or CIDR block that is defined in a policy. Separate multiple IP addresses or CIDR blocks with semicolons (;). You can add a maximum of 10 IP addresses or CIDR blocks.

This parameter is required.', example='113.125.1.101;101.11.1.1'),
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.

This parameter is required.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  policyItemId?: string(name='PolicyItemId', description='The ID of the policy.

This parameter is required.', example='P151617000829241'),
  securityToken?: string(name='SecurityToken'),
}

model ModifyIpControlPolicyItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model ModifyIpControlPolicyItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyIpControlPolicyItemResponseBody(name='body'),
}

/**
 * @summary Modifies a policy in an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   The modification immediately takes effect on all the APIs that are bound to the policy.
 * *   This operation causes a full modification of the content of a policy.
 *
 * @param request ModifyIpControlPolicyItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyIpControlPolicyItemResponse
 */
async function modifyIpControlPolicyItemWithOptions(request: ModifyIpControlPolicyItemRequest, runtime: Util.RuntimeOptions): ModifyIpControlPolicyItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.cidrIp)) {
    query['CidrIp'] = request.cidrIp;
  }
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.policyItemId)) {
    query['PolicyItemId'] = request.policyItemId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyIpControlPolicyItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a policy in an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 * *   The modification immediately takes effect on all the APIs that are bound to the policy.
 * *   This operation causes a full modification of the content of a policy.
 *
 * @param request ModifyIpControlPolicyItemRequest
 * @return ModifyIpControlPolicyItemResponse
 */
async function modifyIpControlPolicyItem(request: ModifyIpControlPolicyItemRequest): ModifyIpControlPolicyItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIpControlPolicyItemWithOptions(request, runtime);
}

model ModifyLogConfigRequest {
  logType?: string(name='LogType', description='The log type. Valid values:

*   **log**: other logs
*   **survey**: inspection logs

Enumeration value:

*   PROVIDER', example='PROVIDER'),
  securityToken?: string(name='SecurityToken'),
  slsLogStore?: string(name='SlsLogStore', description='The name of the Logstore.

This parameter is required.', example='logs-gateway'),
  slsProject?: string(name='SlsProject', description='The name of the Log Service project.

This parameter is required.', example='ford-api-gateway-log'),
}

model ModifyLogConfigResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='75A4ADCB-AA26-51FB-94D4-AB3240040974'),
}

model ModifyLogConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyLogConfigResponseBody(name='body'),
}

/**
 * @summary 修改日志配置
 *
 * @param request ModifyLogConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyLogConfigResponse
 */
async function modifyLogConfigWithOptions(request: ModifyLogConfigRequest, runtime: Util.RuntimeOptions): ModifyLogConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.slsLogStore)) {
    query['SlsLogStore'] = request.slsLogStore;
  }
  if (!Util.isUnset(request.slsProject)) {
    query['SlsProject'] = request.slsProject;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLogConfig',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改日志配置
 *
 * @param request ModifyLogConfigRequest
 * @return ModifyLogConfigResponse
 */
async function modifyLogConfig(request: ModifyLogConfigRequest): ModifyLogConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLogConfigWithOptions(request, runtime);
}

model ModifyModelRequest {
  description?: string(name='Description', description='The description of the new model definition.', example='Model Description'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the model belongs.

This parameter is required.', example='30e792398d6c4569b04c0e53a3494381'),
  modelName?: string(name='ModelName', description='The name of the model.

This parameter is required.', example='Test'),
  newModelName?: string(name='NewModelName', description='The new name of the model.', example='NewTest'),
  schema?: string(name='Schema', description='The new definition of the model.', example='{\\\\"type\\\\":\\\\"object\\\\",\\\\"properties\\\\":{\\\\"id\\\\":{\\\\"format\\\\":\\\\"int64\\\\",\\\\"maximum\\\\":100,\\\\"exclusiveMaximum\\\\":true,\\\\"type\\\\":\\\\"integer\\\\"},\\\\"name\\\\":{\\\\"maxLength\\\\":10,\\\\"type\\\\":\\\\"string\\\\"}}}'),
}

model ModifyModelResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='4173F95B-360C-460C-9F6C-4A960B904411'),
}

model ModifyModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyModelResponseBody(name='body'),
}

/**
 * @summary Updates the model of an API group.
 *
 * @param request ModifyModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyModelResponse
 */
async function modifyModelWithOptions(request: ModifyModelRequest, runtime: Util.RuntimeOptions): ModifyModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.modelName)) {
    query['ModelName'] = request.modelName;
  }
  if (!Util.isUnset(request.newModelName)) {
    query['NewModelName'] = request.newModelName;
  }
  if (!Util.isUnset(request.schema)) {
    query['Schema'] = request.schema;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyModel',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates the model of an API group.
 *
 * @param request ModifyModelRequest
 * @return ModifyModelResponse
 */
async function modifyModel(request: ModifyModelRequest): ModifyModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyModelWithOptions(request, runtime);
}

model ModifyPluginRequest {
  description?: string(name='Description', description='The description of the plug-in. The description can contain a maximum of 200 characters in length.', example='modify plugin first'),
  pluginData?: string(name='PluginData', description='The statement that is used to modify the plug-in definition.', example='Plugin definition'),
  pluginId?: string(name='PluginId', description='The ID of the plug-in whose information you want to modify.

This parameter is required.', example='a96926e82f994915a8da40a119374537'),
  pluginName?: string(name='PluginName', description='The name of the plug-in. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). However, it cannot start with an underscore.', example='modifyCors'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='env'),
      value?: string(name='Value', description='The value of the tag.

N can be an integer from 1 to 20.``

This parameter is required.', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.', example='Key， Value'),
}

model ModifyPluginResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
}

model ModifyPluginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPluginResponseBody(name='body'),
}

/**
 * @summary Modifies the information of a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   The name of the plug-in must be unique.
 *
 * @param request ModifyPluginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPluginResponse
 */
async function modifyPluginWithOptions(request: ModifyPluginRequest, runtime: Util.RuntimeOptions): ModifyPluginResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.pluginData)) {
    query['PluginData'] = request.pluginData;
  }
  if (!Util.isUnset(request.pluginId)) {
    query['PluginId'] = request.pluginId;
  }
  if (!Util.isUnset(request.pluginName)) {
    query['PluginName'] = request.pluginName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyPlugin',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the information of a plug-in.
 *
 * @description *   This operation is intended for API providers.
 * *   The name of the plug-in must be unique.
 *
 * @param request ModifyPluginRequest
 * @return ModifyPluginResponse
 */
async function modifyPlugin(request: ModifyPluginRequest): ModifyPluginResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyPluginWithOptions(request, runtime);
}

model ModifySignatureRequest {
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='436fa39b-b3b9-40c5-ae5d-ce3e000e38c5'),
  signatureId?: string(name='SignatureId', description='The ID of the signature key that you want to manage.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  signatureKey?: string(name='SignatureKey', description='The new Key value of the key. The value must be 6 to 20 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.', example='qwertyuiop'),
  signatureName?: string(name='SignatureName', description='The new name of the key. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.', example='backendsignature'),
  signatureSecret?: string(name='SignatureSecret', description='The new Secret value of the key. The value must be 6 to 30 characters in length and can contain letters, digits, and special characters. Special characters include underscores (_), at signs (@), number signs (#), exclamation points (!), and asterisks (\\\\*). The value must start with a letter.', example='asdfghjkl'),
}

model ModifySignatureResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
  signatureId?: string(name='SignatureId', description='The ID of the key.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  signatureName?: string(name='SignatureName', description='The name of the key.', example='backendsignature'),
}

model ModifySignatureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySignatureResponseBody(name='body'),
}

/**
 * @summary Modifies a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   This API operation modifies the name, Key value, and Secret value of an existing signature key.
 * *   Note that the modification takes effect immediately. If the key has been bound to an API, you must adjust the backend signature verification based on the new key accordingly.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifySignatureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySignatureResponse
 */
async function modifySignatureWithOptions(request: ModifySignatureRequest, runtime: Util.RuntimeOptions): ModifySignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  if (!Util.isUnset(request.signatureKey)) {
    query['SignatureKey'] = request.signatureKey;
  }
  if (!Util.isUnset(request.signatureName)) {
    query['SignatureName'] = request.signatureName;
  }
  if (!Util.isUnset(request.signatureSecret)) {
    query['SignatureSecret'] = request.signatureSecret;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySignature',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a backend signature key.
 *
 * @description *   This API is intended for API providers.
 * *   This API operation modifies the name, Key value, and Secret value of an existing signature key.
 * *   Note that the modification takes effect immediately. If the key has been bound to an API, you must adjust the backend signature verification based on the new key accordingly.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifySignatureRequest
 * @return ModifySignatureResponse
 */
async function modifySignature(request: ModifySignatureRequest): ModifySignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySignatureWithOptions(request, runtime);
}

model ModifyTrafficControlRequest {
  apiDefault?: int32(name='ApiDefault', description='The default throttling value for each API.', example='10000'),
  appDefault?: int32(name='AppDefault', description='The default throttling value for each app.', example='10000'),
  description?: string(name='Description', description='The description of the throttling policy.', example='ThrottlingTestDescription'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='4223a10e-eed3-46a6-8b7c-23003f488153'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.

This parameter is required.', example='tf123456'),
  trafficControlName?: string(name='TrafficControlName', description='The throttling policy name. The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). It cannot start with an underscore.', example='ThrottlingTest'),
  trafficControlUnit?: string(name='TrafficControlUnit', description='The unit to be used in the throttling policy. Valid values:

*   **SECOND**
*   **MINUTE**
*   **HOUR**
*   **DAY**', example='HOUR'),
  userDefault?: int32(name='UserDefault', description='The default throttling value for each user.', example='10000'),
}

model ModifyTrafficControlResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model ModifyTrafficControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTrafficControlResponseBody(name='body'),
}

/**
 * @summary Modifies the settings of a custom throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   The modifications take effect on the bound APIs instantly.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyTrafficControlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTrafficControlResponse
 */
async function modifyTrafficControlWithOptions(request: ModifyTrafficControlRequest, runtime: Util.RuntimeOptions): ModifyTrafficControlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiDefault)) {
    query['ApiDefault'] = request.apiDefault;
  }
  if (!Util.isUnset(request.appDefault)) {
    query['AppDefault'] = request.appDefault;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  if (!Util.isUnset(request.trafficControlName)) {
    query['TrafficControlName'] = request.trafficControlName;
  }
  if (!Util.isUnset(request.trafficControlUnit)) {
    query['TrafficControlUnit'] = request.trafficControlUnit;
  }
  if (!Util.isUnset(request.userDefault)) {
    query['UserDefault'] = request.userDefault;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyTrafficControl',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the settings of a custom throttling policy.
 *
 * @description *   This API is intended for API providers.
 * *   The modifications take effect on the bound APIs instantly.
 * *   The QPS limit on this operation is 50 per user.
 *
 * @param request ModifyTrafficControlRequest
 * @return ModifyTrafficControlResponse
 */
async function modifyTrafficControl(request: ModifyTrafficControlRequest): ModifyTrafficControlResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTrafficControlWithOptions(request, runtime);
}

model ModifyVpcAccessAndUpdateApisRequest {
  instanceId?: string(name='InstanceId', description='The ID of the new instance.', example='i-uf6bzcg1pr4oh5jjmxxx'),
  name?: string(name='Name', description='The name of the VPC authorization.

> 

*   The name of a VPC authorization cannot be changed. You cannot use this parameter to change the name of a VPC authorization.

*   You must set this parameter to the name of the current VPC authorization.

This parameter is required.', example='VpcName'),
  needBatchWork?: boolean(name='NeedBatchWork', description='Specifies whether to update the associated API.

**

**Warning:** If you want to update the VPC authorization of a published API, you must set this parameter to true. Otherwise, the update will not be synchronized to the backend service of the API.', example='true'),
  port?: int32(name='Port', description='The new port number.', example='80'),
  refresh?: boolean(name='Refresh', description='Specifies whether to update the VPC authorization.

> 

*   If the ID of the instance in your VPC is changed but the IP address of the instance remains unchanged, you can set this parameter to true to update the VPC authorization.', example='false'),
  securityToken?: string(name='SecurityToken'),
  token?: string(name='Token', description='The token of the request.', example='c20d86c4-1eb3-4d0b-afe9-c586df1e2136'),
  vpcId?: string(name='VpcId', description='The ID of the new VPC.', example='vpc-m5e7jqfppv5wbvmdw5pg2'),
  vpcTargetHostName?: string(name='VpcTargetHostName', description='The hostname of the backend service.', example='iot.hu***ng.com'),
}

model ModifyVpcAccessAndUpdateApisResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the asynchronous task.

> 

*   If the associated API is updated, you can use the task ID in the **DescribeUpdateVpcInfoTask** operation to query the update result.', example='7b6d0cb72b2e4215b0129f675c889746'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='C2CEC6EA-EEBA-5FD6-8BD9-2CF01980FE39'),
}

model ModifyVpcAccessAndUpdateApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVpcAccessAndUpdateApisResponseBody(name='body'),
}

/**
 * @summary Modifies a virtual private cloud (VPC) authorization and updates the metadata of the API associated with the VPC authorization.
 *
 * @param request ModifyVpcAccessAndUpdateApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVpcAccessAndUpdateApisResponse
 */
async function modifyVpcAccessAndUpdateApisWithOptions(request: ModifyVpcAccessAndUpdateApisRequest, runtime: Util.RuntimeOptions): ModifyVpcAccessAndUpdateApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.needBatchWork)) {
    query['NeedBatchWork'] = request.needBatchWork;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.refresh)) {
    query['Refresh'] = request.refresh;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vpcTargetHostName)) {
    query['VpcTargetHostName'] = request.vpcTargetHostName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVpcAccessAndUpdateApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a virtual private cloud (VPC) authorization and updates the metadata of the API associated with the VPC authorization.
 *
 * @param request ModifyVpcAccessAndUpdateApisRequest
 * @return ModifyVpcAccessAndUpdateApisResponse
 */
async function modifyVpcAccessAndUpdateApis(request: ModifyVpcAccessAndUpdateApisRequest): ModifyVpcAccessAndUpdateApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVpcAccessAndUpdateApisWithOptions(request, runtime);
}

model OpenApiGatewayServiceResponseBody = {
  orderId?: string(name='OrderId', example='210981***530495'),
  requestId?: string(name='RequestId', example='2D39D1B3-8548-508A-9CE2-7F4A3F2A7989'),
}

model OpenApiGatewayServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenApiGatewayServiceResponseBody(name='body'),
}

/**
 * @summary 开通API网关服务
 *
 * @param request OpenApiGatewayServiceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenApiGatewayServiceResponse
 */
async function openApiGatewayServiceWithOptions(runtime: Util.RuntimeOptions): OpenApiGatewayServiceResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'OpenApiGatewayService',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开通API网关服务
 *
 * @return OpenApiGatewayServiceResponse
 */
async function openApiGatewayService(): OpenApiGatewayServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return openApiGatewayServiceWithOptions(runtime);
}

model QueryRequestLogsRequest {
  requestLogId?: string(name='RequestLogId', description='The ID of the request log.

This parameter is required.', example='95657ED9-2F6F-426F-BD99-79C8********'),
  securityToken?: string(name='SecurityToken'),
}

model QueryRequestLogsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C81********'),
  requestLogs?: {
    requestLog?: [ 
    {
      apiId?: string(name='ApiId', description='The API ID.', example='4b83229ebcab4ecd88956fb3********'),
      apiName?: string(name='ApiName', description='The API name.', example='ApiName'),
      appName?: string(name='AppName', description='The application name.', example='VIPROOM_VIPROOM'),
      backendRequestEnd?: long(name='BackendRequestEnd', description='The time when API Gateway finished forwarding the request to the backend service.', example='1731487224969'),
      backendRequestStart?: long(name='BackendRequestStart', description='The time when API Gateway started to forward the request to the backend service.', example='1731487224969'),
      backendResponseEnd?: long(name='BackendResponseEnd', description='The time when API Gateway finished receiving the response from the backend service.', example='1731487224989'),
      backendResponseStart?: long(name='BackendResponseStart', description='The time when API Gateway started to receive the response from the backend service.', example='1731487224989'),
      clientIp?: string(name='ClientIp', description='The IP address of the client that sends the request.', example='21.237.XXX.XXX'),
      clientNonce?: string(name='ClientNonce', description='The X-Ca-Nonce header included in the request from the client.', example='d43df9db-3b05-4cd6-888a-1c0b********'),
      consumerAppId?: string(name='ConsumerAppId', description='The application ID that is used by the caller.', example='11096****'),
      consumerAppKey?: string(name='ConsumerAppKey', description='The App Key that is used by the caller.', example='20412****'),
      customTraceId?: string(name='CustomTraceId', description='The custom trace ID.', example='95657ED9-2F6F-426F-BD99-79C8********'),
      domain?: string(name='Domain', description='The requested domain name in the request.', example='360bdd88695c48ae8085c7f2********-ap-southeast-1.alicloudapi.com'),
      errorCode?: string(name='ErrorCode', description='The error code that is returned.', example='X500ER'),
      errorMessage?: string(name='ErrorMessage', description='The error message returned if the call fails.', example='Backend service connect failed `Timeout connecting to [/1XX.20.0.XX:8080]`'),
      exception?: string(name='Exception', description='The specific error message returned by the backend service.', example='error msg'),
      frontRequestEnd?: long(name='FrontRequestEnd', description='The time when API Gateway finished receiving the request.', example='1731487224968'),
      frontRequestStart?: long(name='FrontRequestStart', description='The time when API Gateway started to receive the request.', example='1731487224968'),
      frontResponseEnd?: long(name='FrontResponseEnd', description='The time when API Gateway finished forwarding the response to the client.', example='1731487224989'),
      frontResponseStart?: long(name='FrontResponseStart', description='The time when API Gateway started to forward the response to the client.', example='1731487224989'),
      groupId?: string(name='GroupId', description='The ID of the API group to which the API belongs.', example='dc024277fe6c4cada79ba0bd6********'),
      groupName?: string(name='GroupName', description='The name of the API group to which the API belongs.', example='GroupName'),
      httpMethod?: string(name='HttpMethod', description='The HTTP method that is used to send the request.', example='POST'),
      httpPath?: string(name='HttpPath', description='The path of the request.', example='/testPath'),
      initialRequestId?: string(name='InitialRequestId', description='The initial request ID when API Gateway calls an API. For example, if API-1 calls API-2, the initialRequestId parameter in the log of API-2 indicates the ID of the request from API-1.', example='95657ED9-2F6F-426F-BD99-79C8********'),
      instanceId?: string(name='InstanceId', description='The ID of the API Gateway instance to which the API belongs.', example='apigateway-bj-ab2b********'),
      jwtClaims?: string(name='JwtClaims', description='The JSON web token (JWT) claims. The claims can be configured at the group level.', example='{}'),
      region?: string(name='Region', description='The region in which the instance resides.', example='cn-hangzhou'),
      requestBody?: string(name='RequestBody', description='The request body. A request body cannot exceed 1,024 bytes in size.', example='param=paramName'),
      requestHeaders?: string(name='RequestHeaders', description='The request headers.', example='content-type: application/x-www-form-urlencoded'),
      requestId?: string(name='RequestId', description='The request ID.', example='95657ED9-2F6F-426F-BD99-79C8********'),
      requestProtocol?: string(name='RequestProtocol', description='The protocol used by the client to send the request. Valid values: HTTP, HTTPS, and WS.', example='HTTP'),
      requestQueryString?: string(name='RequestQueryString', description='The query string for the request.', example='username=name'),
      requestSize?: string(name='RequestSize', description='The size of the request. Unit: bytes.', example='1923'),
      requestTime?: string(name='RequestTime', description='The request time, in UTC.', example='2022-10-29T03:59:59Z'),
      responseBody?: string(name='ResponseBody', description='The response body. A response body cannot exceed 1,024 bytes in size.', example='param=paramName'),
      responseHeaders?: string(name='ResponseHeaders', description='The headers in the API response.', example='content-type: application/x-www-form-urlencoded'),
      responseSize?: string(name='ResponseSize', description='The size of returned data. Unit: bytes.', example='23441'),
      serviceLatency?: string(name='ServiceLatency', description='The total time consumed to access the backend resources. The total time includes the time consumed to request a connection to the resources, the time consumed to establish the connection, and the time consumed to call the backend service. Unit: milliseconds.', example='324'),
      stageId?: string(name='StageId', description='The ID of the API environment.', example='8a305b7f10334052a52d9156********'),
      stageName?: string(name='StageName', description='The name of the API environment.', example='RELEASE'),
      statusCode?: string(name='StatusCode', description='The status code returned.', example='200'),
      totalLatency?: string(name='TotalLatency', description='The total time consumed by the request. Unit: milliseconds.', example='1345'),
      plugin?: string(name='plugin', description='The plug-in hit by the request and the relevant context.', example='[]'),
    }
  ](name='RequestLog')
  }(name='RequestLogs', description='The request logs.'),
}

model QueryRequestLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryRequestLogsResponseBody(name='body'),
}

/**
 * @summary Queries the request logs of a user.
 *
 * @param request QueryRequestLogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryRequestLogsResponse
 */
async function queryRequestLogsWithOptions(request: QueryRequestLogsRequest, runtime: Util.RuntimeOptions): QueryRequestLogsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.requestLogId)) {
    query['RequestLogId'] = request.requestLogId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryRequestLogs',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the request logs of a user.
 *
 * @param request QueryRequestLogsRequest
 * @return QueryRequestLogsResponse
 */
async function queryRequestLogs(request: QueryRequestLogsRequest): QueryRequestLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRequestLogsWithOptions(request, runtime);
}

model ReactivateDomainRequest {
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
}

model ReactivateDomainResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
}

model ReactivateDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReactivateDomainResponseBody(name='body'),
}

/**
 * @summary Reactivates a custom domain name whose validity status is Abnormal.
 *
 * @description *   This operation is intended for API providers.
 * *   You must solve the problem that is mentioned in the domain name exception prompt before you can reactivate the domain name.
 * *   A typical reason why a custom domain name becomes abnormal is that the domain name does not have an ICP filing or the domain name is included in a blacklist by the administration. When a custom domain name is abnormal, users cannot use it to call APIs.
 * *   You can call this operation to reactivate the domain name to resume normal access.
 *
 * @param request ReactivateDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReactivateDomainResponse
 */
async function reactivateDomainWithOptions(request: ReactivateDomainRequest, runtime: Util.RuntimeOptions): ReactivateDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReactivateDomain',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Reactivates a custom domain name whose validity status is Abnormal.
 *
 * @description *   This operation is intended for API providers.
 * *   You must solve the problem that is mentioned in the domain name exception prompt before you can reactivate the domain name.
 * *   A typical reason why a custom domain name becomes abnormal is that the domain name does not have an ICP filing or the domain name is included in a blacklist by the administration. When a custom domain name is abnormal, users cannot use it to call APIs.
 * *   You can call this operation to reactivate the domain name to resume normal access.
 *
 * @param request ReactivateDomainRequest
 * @return ReactivateDomainResponse
 */
async function reactivateDomain(request: ReactivateDomainRequest): ReactivateDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return reactivateDomainWithOptions(request, runtime);
}

model RemoveAccessControlListEntryRequest {
  aclEntrys?: string(name='AclEntrys', example='[{\\\\"entry\\\\":\\\\"192.168.1.0/24\\\\",\\\\"comment\\\\":\\\\"WhiteIp\\\\"}]'),
  aclId?: string(name='AclId', description='This parameter is required.', example='acl-bp12ag0xxcfhq1ll68wp9'),
  securityToken?: string(name='SecurityToken'),
}

model RemoveAccessControlListEntryResponseBody = {
  requestId?: string(name='RequestId', example='D1B18FFE-4A81-59D8-AA02-1817098977CD'),
}

model RemoveAccessControlListEntryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveAccessControlListEntryResponseBody(name='body'),
}

/**
 * @summary 删除访问控制策略中IP条目
 *
 * @param request RemoveAccessControlListEntryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveAccessControlListEntryResponse
 */
async function removeAccessControlListEntryWithOptions(request: RemoveAccessControlListEntryRequest, runtime: Util.RuntimeOptions): RemoveAccessControlListEntryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclEntrys)) {
    query['AclEntrys'] = request.aclEntrys;
  }
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveAccessControlListEntry',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除访问控制策略中IP条目
 *
 * @param request RemoveAccessControlListEntryRequest
 * @return RemoveAccessControlListEntryResponse
 */
async function removeAccessControlListEntry(request: RemoveAccessControlListEntryRequest): RemoveAccessControlListEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAccessControlListEntryWithOptions(request, runtime);
}

model RemoveApiProductsAuthoritiesRequest {
  apiProductIds?: [ string ](name='ApiProductIds', description='The API products.

This parameter is required.'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='110982490'),
  securityToken?: string(name='SecurityToken'),
}

model RemoveApiProductsAuthoritiesShrinkRequest {
  apiProductIdsShrink?: string(name='ApiProductIds', description='The API products.

This parameter is required.'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='110982490'),
  securityToken?: string(name='SecurityToken'),
}

model RemoveApiProductsAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
}

model RemoveApiProductsAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveApiProductsAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Revokes permissions on API products from an application.
 *
 * @param tmpReq RemoveApiProductsAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveApiProductsAuthoritiesResponse
 */
async function removeApiProductsAuthoritiesWithOptions(tmpReq: RemoveApiProductsAuthoritiesRequest, runtime: Util.RuntimeOptions): RemoveApiProductsAuthoritiesResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveApiProductsAuthoritiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.apiProductIds)) {
    request.apiProductIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.apiProductIds, 'ApiProductIds', 'simple');
  }
  var query = {};
  if (!Util.isUnset(request.apiProductIdsShrink)) {
    query['ApiProductIds'] = request.apiProductIdsShrink;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveApiProductsAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Revokes permissions on API products from an application.
 *
 * @param request RemoveApiProductsAuthoritiesRequest
 * @return RemoveApiProductsAuthoritiesResponse
 */
async function removeApiProductsAuthorities(request: RemoveApiProductsAuthoritiesRequest): RemoveApiProductsAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeApiProductsAuthoritiesWithOptions(request, runtime);
}

model RemoveApisAuthoritiesRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.

This parameter is required.', example='baacc592e63a4cb6a41920d9d3f91f38,jkscc489e63a4cb6a41920d9d3f92d78'),
  appId?: long(name='AppId', description='The ID of the appplication. The ID is generated by the system and globally unique.

This parameter is required.', example='2386789'),
  description?: string(name='Description', description='The description of the authorization.', example='Queries weather based on the region name'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model RemoveApisAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model RemoveApisAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveApisAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Revokes the access permissions on multiple APIs from a specified application.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   Before you revoke access permissions, check by whom the permissions were granted. API providers can only revoke permissions granted by a Provider, and API callers can only revoke permissions granted by a Consumer.
 *
 * @param request RemoveApisAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveApisAuthoritiesResponse
 */
async function removeApisAuthoritiesWithOptions(request: RemoveApisAuthoritiesRequest, runtime: Util.RuntimeOptions): RemoveApisAuthoritiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveApisAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Revokes the access permissions on multiple APIs from a specified application.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   Before you revoke access permissions, check by whom the permissions were granted. API providers can only revoke permissions granted by a Provider, and API callers can only revoke permissions granted by a Consumer.
 *
 * @param request RemoveApisAuthoritiesRequest
 * @return RemoveApisAuthoritiesResponse
 */
async function removeApisAuthorities(request: RemoveApisAuthoritiesRequest): RemoveApisAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeApisAuthoritiesWithOptions(request, runtime);
}

model RemoveAppsAuthoritiesRequest {
  apiId?: string(name='ApiId', description='The ID of the API. This ID is generated by the system and globally unique.

This parameter is required.', example='baacc592e63a4cb6a41920d9d3f91f38'),
  appIds?: string(name='AppIds', description='The IDs of applications. Separate multiple application IDs with commas (,). A maximum of 100 applications IDs can be entered.

This parameter is required.', example='2386789,3286798'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model RemoveAppsAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model RemoveAppsAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveAppsAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Revokes the access permissions on a specified API from multiple applications. In this case, multiple applications map to a single API.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   Before you revoke access permissions, check by whom the permissions were granted. API providers can only revoke permissions granted by a Provider, and API callers can only revoke permissions granted by a Consumer.
 *
 * @param request RemoveAppsAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveAppsAuthoritiesResponse
 */
async function removeAppsAuthoritiesWithOptions(request: RemoveAppsAuthoritiesRequest, runtime: Util.RuntimeOptions): RemoveAppsAuthoritiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveAppsAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Revokes the access permissions on a specified API from multiple applications. In this case, multiple applications map to a single API.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   Before you revoke access permissions, check by whom the permissions were granted. API providers can only revoke permissions granted by a Provider, and API callers can only revoke permissions granted by a Consumer.
 *
 * @param request RemoveAppsAuthoritiesRequest
 * @return RemoveAppsAuthoritiesResponse
 */
async function removeAppsAuthorities(request: RemoveAppsAuthoritiesRequest): RemoveAppsAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAppsAuthoritiesWithOptions(request, runtime);
}

model RemoveIpControlApisRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs from which you want to unbind the ACL.

*   If this parameter is not specified, the ACL is unbound from all the APIs in the specified environment of the API group.
*   The IDs of APIs that you want to query. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='123'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  ipControlId?: string(name='IpControlId', description='The ID of the ACL.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model RemoveIpControlApisResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model RemoveIpControlApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveIpControlApisResponseBody(name='body'),
}

/**
 * @summary Unbinds an API from an access control list (ACL).
 *
 * @description *   This operation is intended for API callers.
 * *   The unbinding takes effect immediately. After the API is unbound from the ACL, the corresponding environment does not have any IP address access control in place for the API.
 *
 * @param request RemoveIpControlApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveIpControlApisResponse
 */
async function removeIpControlApisWithOptions(request: RemoveIpControlApisRequest, runtime: Util.RuntimeOptions): RemoveIpControlApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveIpControlApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds an API from an access control list (ACL).
 *
 * @description *   This operation is intended for API callers.
 * *   The unbinding takes effect immediately. After the API is unbound from the ACL, the corresponding environment does not have any IP address access control in place for the API.
 *
 * @param request RemoveIpControlApisRequest
 * @return RemoveIpControlApisResponse
 */
async function removeIpControlApis(request: RemoveIpControlApisRequest): RemoveIpControlApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeIpControlApisWithOptions(request, runtime);
}

model RemoveIpControlPolicyItemRequest {
  ipControlId?: string(name='IpControlId', description='The ID of the ACL. The ID is unique.

This parameter is required.', example='7ea91319a34d48a09b5c9c871d9768b1'),
  policyItemIds?: string(name='PolicyItemIds', description='The ID of a policy. Separate multiple IDs with semicolons (;). A maximum of 100 IDs can be entered.

This parameter is required.', example='P151533572852362;P151533557750260'),
  securityToken?: string(name='SecurityToken'),
}

model RemoveIpControlPolicyItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model RemoveIpControlPolicyItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveIpControlPolicyItemResponseBody(name='body'),
}

/**
 * @summary Removes one or more policies from an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request RemoveIpControlPolicyItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveIpControlPolicyItemResponse
 */
async function removeIpControlPolicyItemWithOptions(request: RemoveIpControlPolicyItemRequest, runtime: Util.RuntimeOptions): RemoveIpControlPolicyItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.policyItemIds)) {
    query['PolicyItemIds'] = request.policyItemIds;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveIpControlPolicyItem',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes one or more policies from an access control list (ACL).
 *
 * @description *   This operation is intended for API providers.
 *
 * @param request RemoveIpControlPolicyItemRequest
 * @return RemoveIpControlPolicyItemResponse
 */
async function removeIpControlPolicyItem(request: RemoveIpControlPolicyItemRequest): RemoveIpControlPolicyItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeIpControlPolicyItemWithOptions(request, runtime);
}

model RemoveSignatureApisRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs from which you want to unbind the signature key.

*   If this parameter is not specified, the signature key is unbound from all the APIs in the specified environment of the API group.
*   The IDs of the APIs that you want to manage. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='123'),
  groupId?: string(name='GroupId', description='The ID of the API group to which the API that you want to manage belongs.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken'),
  signatureId?: string(name='SignatureId', description='The ID of the signature key.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model RemoveSignatureApisResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model RemoveSignatureApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveSignatureApisResponseBody(name='body'),
}

/**
 * @summary Unbinds a backend signature key from APIs.
 *
 * @description *   This API is intended for API providers.
 * *   The operation takes effect immediately. The request sent from API Gateway to the backend service does not contain the signature string. The corresponding verification step can be removed from the backend.
 *
 * @param request RemoveSignatureApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveSignatureApisResponse
 */
async function removeSignatureApisWithOptions(request: RemoveSignatureApisRequest, runtime: Util.RuntimeOptions): RemoveSignatureApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveSignatureApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds a backend signature key from APIs.
 *
 * @description *   This API is intended for API providers.
 * *   The operation takes effect immediately. The request sent from API Gateway to the backend service does not contain the signature string. The corresponding verification step can be removed from the backend.
 *
 * @param request RemoveSignatureApisRequest
 * @return RemoveSignatureApisResponse
 */
async function removeSignatureApis(request: RemoveSignatureApisRequest): RemoveSignatureApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeSignatureApisWithOptions(request, runtime);
}

model RemoveTrafficControlApisRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs from which you want to unbind a specified throttling policy.

*   If this parameter is not specified, the throttling policy is unbound from all the APIs in the specified environment of the API group.
*   Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='3b81fd160f5645e097cc8855d75a1cf6,46fbb52840d146f186e38e8e70fc8c12'),
  groupId?: string(name='GroupId', description='The ID of the API group containing the APIs from which you want to unbind a specified throttling policy.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='4223a10e-eed3-46a6-8b7c-23003f488153'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy that you want to unbind from APIs.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
}

model RemoveTrafficControlApisResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model RemoveTrafficControlApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveTrafficControlApisResponseBody(name='body'),
}

/**
 * @summary Unbinds a specified throttling policy from APIs.
 *
 * @description *   This API is intended for API providers.
 * *   This API allows you to unbind a specified throttling policy from up to 100 APIs at a time.
 *
 * @param request RemoveTrafficControlApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveTrafficControlApisResponse
 */
async function removeTrafficControlApisWithOptions(request: RemoveTrafficControlApisRequest, runtime: Util.RuntimeOptions): RemoveTrafficControlApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveTrafficControlApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds a specified throttling policy from APIs.
 *
 * @description *   This API is intended for API providers.
 * *   This API allows you to unbind a specified throttling policy from up to 100 APIs at a time.
 *
 * @param request RemoveTrafficControlApisRequest
 * @return RemoveTrafficControlApisResponse
 */
async function removeTrafficControlApis(request: RemoveTrafficControlApisRequest): RemoveTrafficControlApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeTrafficControlApisWithOptions(request, runtime);
}

model RemoveVpcAccessRequest {
  instanceId?: string(name='InstanceId', description='The ID of an ECS or SLB instance in the VPC.

This parameter is required.', example='i-uf6bzcg1pr4oh5jjmxxx'),
  needBatchWork?: boolean(name='NeedBatchWork', description='Specifies whether batch work is required.', example='true'),
  port?: int32(name='Port', description='The port number that corresponds to the instance.

This parameter is required.', example='80'),
  securityToken?: string(name='SecurityToken'),
  vpcId?: string(name='VpcId', description='The ID of the VPC.

This parameter is required.', example='vpc-uf657qec7lx42paw3qxxx'),
}

model RemoveVpcAccessResponseBody = {
  apis?: {
    api?: [ 
    {
      apiId?: string(name='ApiId', description='API Id', example='551877242a4b4f3a84a56b7c3570e4a7'),
      groupId?: string(name='GroupId', description='The ID of the API group.', example='78d54ac4424d4b1792e33ca35637e8e4'),
      stageId?: string(name='StageId', description='The ID of the runtime environment.', example='d1e1ee28f9fb4b729db0ee8ca76ff0a5'),
    }
  ](name='Api')
  }(name='Apis', description='API operations'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model RemoveVpcAccessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveVpcAccessResponseBody(name='body'),
}

/**
 * @summary Deletes a VPC authorization without unpublishing the associated APIs.
 *
 * @description *   This API is intended for API providers.
 * *   Revokes the permissions of API Gateway to access your VPC instance.
 * >  Deleting an authorization affects the associated API. Before you delete the authorization, make sure that it is not used by the API.
 *
 * @param request RemoveVpcAccessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveVpcAccessResponse
 */
async function removeVpcAccessWithOptions(request: RemoveVpcAccessRequest, runtime: Util.RuntimeOptions): RemoveVpcAccessResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.needBatchWork)) {
    query['NeedBatchWork'] = request.needBatchWork;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveVpcAccess',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a VPC authorization without unpublishing the associated APIs.
 *
 * @description *   This API is intended for API providers.
 * *   Revokes the permissions of API Gateway to access your VPC instance.
 * >  Deleting an authorization affects the associated API. Before you delete the authorization, make sure that it is not used by the API.
 *
 * @param request RemoveVpcAccessRequest
 * @return RemoveVpcAccessResponse
 */
async function removeVpcAccess(request: RemoveVpcAccessRequest): RemoveVpcAccessResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeVpcAccessWithOptions(request, runtime);
}

model RemoveVpcAccessAndAbolishApisRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='i-uf6iaale3gfef9t9cb41'),
  needBatchWork?: boolean(name='NeedBatchWork', example='true'),
  port?: int32(name='Port', description='This parameter is required.', example='8080'),
  securityToken?: string(name='SecurityToken'),
  vpcId?: string(name='VpcId', description='This parameter is required.', example='vpc-bp1iw82phcgkvupgfv0o8'),
}

model RemoveVpcAccessAndAbolishApisResponseBody = {
  operationId?: string(name='OperationId', example='f7834d74be4e41aa8e607b0fafae9b33'),
  requestId?: string(name='RequestId', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ016'),
}

model RemoveVpcAccessAndAbolishApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveVpcAccessAndAbolishApisResponseBody(name='body'),
}

/**
 * @summary 删除VPC授权并下线关联API
 *
 * @param request RemoveVpcAccessAndAbolishApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveVpcAccessAndAbolishApisResponse
 */
async function removeVpcAccessAndAbolishApisWithOptions(request: RemoveVpcAccessAndAbolishApisRequest, runtime: Util.RuntimeOptions): RemoveVpcAccessAndAbolishApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.needBatchWork)) {
    query['NeedBatchWork'] = request.needBatchWork;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveVpcAccessAndAbolishApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除VPC授权并下线关联API
 *
 * @param request RemoveVpcAccessAndAbolishApisRequest
 * @return RemoveVpcAccessAndAbolishApisResponse
 */
async function removeVpcAccessAndAbolishApis(request: RemoveVpcAccessAndAbolishApisRequest): RemoveVpcAccessAndAbolishApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeVpcAccessAndAbolishApisWithOptions(request, runtime);
}

model ResetAppCodeRequest {
  appCode?: string(name='AppCode', description='The AppCode of the app.

This parameter is required.', example='3aaf905a0a1f4f0eabc6d891dfa08afc'),
  newAppCode?: string(name='NewAppCode', description='The new AppCode of the app.', example='6f0e7ab2aa5f4b8fb18421e6edf4fb6c2'),
  securityToken?: string(name='SecurityToken'),
}

model ResetAppCodeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D1B18FFE-4A81-59D8-AA02-1817098977CD'),
}

model ResetAppCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetAppCodeResponseBody(name='body'),
}

/**
 * @summary Resets the AppCode of an application. You can call this operation only once per minute.
 *
 * @param request ResetAppCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetAppCodeResponse
 */
async function resetAppCodeWithOptions(request: ResetAppCodeRequest, runtime: Util.RuntimeOptions): ResetAppCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.newAppCode)) {
    query['NewAppCode'] = request.newAppCode;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResetAppCode',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Resets the AppCode of an application. You can call this operation only once per minute.
 *
 * @param request ResetAppCodeRequest
 * @return ResetAppCodeResponse
 */
async function resetAppCode(request: ResetAppCodeRequest): ResetAppCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAppCodeWithOptions(request, runtime);
}

model ResetAppSecretRequest {
  appKey?: string(name='AppKey', description='The key of the application that is used to make an API call.

This parameter is required.', example='60030986'),
  newAppKey?: string(name='NewAppKey', description='The new AppKey that you set must be globally unique.', example='testAppKey'),
  newAppSecret?: string(name='NewAppSecret', description='The new key of the application. To improve compatibility, we recommend that you use other parameters.', example='test***'),
  securityToken?: string(name='SecurityToken'),
}

model ResetAppSecretResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
}

model ResetAppSecretResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetAppSecretResponseBody(name='body'),
}

/**
 * @summary Resets the key of an application.
 *
 * @description *   This operation is intended for API callers.
 * *   A new secret is automatically generated after you have called this operation. This secret cannot be customized.
 * *   The results returned by this operation do not contain the application secret. You can obtain the secret by calling DescribeAppSecurity.
 *
 * @param request ResetAppSecretRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetAppSecretResponse
 */
async function resetAppSecretWithOptions(request: ResetAppSecretRequest, runtime: Util.RuntimeOptions): ResetAppSecretResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appKey)) {
    query['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.newAppKey)) {
    query['NewAppKey'] = request.newAppKey;
  }
  if (!Util.isUnset(request.newAppSecret)) {
    query['NewAppSecret'] = request.newAppSecret;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResetAppSecret',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Resets the key of an application.
 *
 * @description *   This operation is intended for API callers.
 * *   A new secret is automatically generated after you have called this operation. This secret cannot be customized.
 * *   The results returned by this operation do not contain the application secret. You can obtain the secret by calling DescribeAppSecurity.
 *
 * @param request ResetAppSecretRequest
 * @return ResetAppSecretResponse
 */
async function resetAppSecret(request: ResetAppSecretRequest): ResetAppSecretResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAppSecretWithOptions(request, runtime);
}

model SdkGenerateByAppRequest {
  appId?: long(name='AppId', description='This parameter is required.', example='110797019'),
  language?: string(name='Language', description='This parameter is required.', example='java'),
  securityToken?: string(name='SecurityToken'),
}

model SdkGenerateByAppResponseBody = {
  downloadLink?: string(name='DownloadLink', example='UEsDBBQACAAIADdwnFQAAAAAAAAAAAAAAAA2AAAAQ0FTREtfSkFWQV8xMjI3NDY2NjY0MzM0MTMzXzE2NTExMjU3MD......'),
  requestId?: string(name='RequestId', example='61A16D46-EC04-5288-8A18-811B0F536CC2'),
}

model SdkGenerateByAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SdkGenerateByAppResponseBody(name='body'),
}

/**
 * @summary 根据APP生成SDK
 *
 * @param request SdkGenerateByAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SdkGenerateByAppResponse
 */
async function sdkGenerateByAppWithOptions(request: SdkGenerateByAppRequest, runtime: Util.RuntimeOptions): SdkGenerateByAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SdkGenerateByApp',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据APP生成SDK
 *
 * @param request SdkGenerateByAppRequest
 * @return SdkGenerateByAppResponse
 */
async function sdkGenerateByApp(request: SdkGenerateByAppRequest): SdkGenerateByAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return sdkGenerateByAppWithOptions(request, runtime);
}

model SdkGenerateByAppForRegionRequest {
  appId?: long(name='AppId', description='The ID of the app. This ID is generated by the system and globally unique.

This parameter is required.', example='110906109'),
  language?: string(name='Language', description='The programming language in which the SDK is generated.

This parameter is required.', example='java'),
  securityToken?: string(name='SecurityToken'),
}

model SdkGenerateByAppForRegionResponseBody = {
  downloadLink?: string(name='DownloadLink', description='The code of the SDK by using the Base64 scheme. You can obtain the file by using the Base64 decoding scheme.', example='UEsDBBQACAAIADdwnFQAAAAAAAAAAAAAAAA2AAAAQ0FTREtfSkFWQV8xMjI3NDY2NjY0MzM0MTMzXzE2NTExMjU3MD......'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CE5722A6-AE78-4741-A9B0-6C817D360510'),
}

model SdkGenerateByAppForRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SdkGenerateByAppForRegionResponseBody(name='body'),
}

/**
 * @summary 生成与App关联的API的SDK
 *
 * @param request SdkGenerateByAppForRegionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SdkGenerateByAppForRegionResponse
 */
async function sdkGenerateByAppForRegionWithOptions(request: SdkGenerateByAppForRegionRequest, runtime: Util.RuntimeOptions): SdkGenerateByAppForRegionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SdkGenerateByAppForRegion',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 生成与App关联的API的SDK
 *
 * @param request SdkGenerateByAppForRegionRequest
 * @return SdkGenerateByAppForRegionResponse
 */
async function sdkGenerateByAppForRegion(request: SdkGenerateByAppForRegionRequest): SdkGenerateByAppForRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  return sdkGenerateByAppForRegionWithOptions(request, runtime);
}

model SdkGenerateByGroupRequest {
  groupId?: string(name='GroupId', description='This parameter is required.', example='1a991a450b9548a1a3df38fd3af117c2'),
  language?: string(name='Language', description='This parameter is required.', example='java'),
  securityToken?: string(name='SecurityToken'),
}

model SdkGenerateByGroupResponseBody = {
  downloadLink?: string(name='DownloadLink', example='http://oss-bucket/object'),
  requestId?: string(name='RequestId', example='D0075BDA-8AED-5073-A70A-FE44E86AB20F'),
}

model SdkGenerateByGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SdkGenerateByGroupResponseBody(name='body'),
}

/**
 * @summary 根据分组生成SDK
 *
 * @param request SdkGenerateByGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SdkGenerateByGroupResponse
 */
async function sdkGenerateByGroupWithOptions(request: SdkGenerateByGroupRequest, runtime: Util.RuntimeOptions): SdkGenerateByGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SdkGenerateByGroup',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据分组生成SDK
 *
 * @param request SdkGenerateByGroupRequest
 * @return SdkGenerateByGroupResponse
 */
async function sdkGenerateByGroup(request: SdkGenerateByGroupRequest): SdkGenerateByGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return sdkGenerateByGroupWithOptions(request, runtime);
}

model SetAccessControlListAttributeRequest {
  aclId?: string(name='AclId', description='This parameter is required.', example='acl-bp1ohqkonqybecf4llbrc'),
  aclName?: string(name='AclName', description='This parameter is required.', example='testAcl'),
  securityToken?: string(name='SecurityToken'),
}

model SetAccessControlListAttributeResponseBody = {
  requestId?: string(name='RequestId', example='CEB6EC62-B6C7-5082-A45A-45A204724AC2'),
}

model SetAccessControlListAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetAccessControlListAttributeResponseBody(name='body'),
}

/**
 * @summary 修改访问控制策略的名称
 *
 * @param request SetAccessControlListAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetAccessControlListAttributeResponse
 */
async function setAccessControlListAttributeWithOptions(request: SetAccessControlListAttributeRequest, runtime: Util.RuntimeOptions): SetAccessControlListAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetAccessControlListAttribute',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改访问控制策略的名称
 *
 * @param request SetAccessControlListAttributeRequest
 * @return SetAccessControlListAttributeResponse
 */
async function setAccessControlListAttribute(request: SetAccessControlListAttributeRequest): SetAccessControlListAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAccessControlListAttributeWithOptions(request, runtime);
}

model SetApiProductsAuthoritiesRequest {
  apiProductIds?: [ string ](name='ApiProductIds', description='The API products.

This parameter is required.'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='111385984'),
  authValidTime?: string(name='AuthValidTime', description='授权有效时间的截止时间，请设置格林尼治标准时间(GMT), 如果为空，即为授权永久有效。', example='2023-06-12T03:07:37Z'),
  description?: string(name='Description', description='The authorization description.', example='test'),
  securityToken?: string(name='SecurityToken'),
}

model SetApiProductsAuthoritiesShrinkRequest {
  apiProductIdsShrink?: string(name='ApiProductIds', description='The API products.

This parameter is required.'),
  appId?: long(name='AppId', description='The application ID.

This parameter is required.', example='111385984'),
  authValidTime?: string(name='AuthValidTime', description='授权有效时间的截止时间，请设置格林尼治标准时间(GMT), 如果为空，即为授权永久有效。', example='2023-06-12T03:07:37Z'),
  description?: string(name='Description', description='The authorization description.', example='test'),
  securityToken?: string(name='SecurityToken'),
}

model SetApiProductsAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='2603F41E-77FC-59A3-840E-296578A9BDE0'),
}

model SetApiProductsAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetApiProductsAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Grants permissions on API products to an application.
 *
 * @param tmpReq SetApiProductsAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetApiProductsAuthoritiesResponse
 */
async function setApiProductsAuthoritiesWithOptions(tmpReq: SetApiProductsAuthoritiesRequest, runtime: Util.RuntimeOptions): SetApiProductsAuthoritiesResponse {
  Util.validateModel(tmpReq);
  var request = new SetApiProductsAuthoritiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.apiProductIds)) {
    request.apiProductIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.apiProductIds, 'ApiProductIds', 'simple');
  }
  var query = {};
  if (!Util.isUnset(request.apiProductIdsShrink)) {
    query['ApiProductIds'] = request.apiProductIdsShrink;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.authValidTime)) {
    query['AuthValidTime'] = request.authValidTime;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetApiProductsAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Grants permissions on API products to an application.
 *
 * @param request SetApiProductsAuthoritiesRequest
 * @return SetApiProductsAuthoritiesResponse
 */
async function setApiProductsAuthorities(request: SetApiProductsAuthoritiesRequest): SetApiProductsAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return setApiProductsAuthoritiesWithOptions(request, runtime);
}

model SetApisAuthoritiesRequest {
  apiIds?: string(name='ApiIds', description='The IDs of the APIs. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.', example='baacc592e63a4cb6a41920d9d3f91f38,jkscc489e63a4cb6a41920d9d3f92d78'),
  appId?: long(name='AppId', description='The ID of the application. This ID is generated by the system and globally unique.

This parameter is required.', example='2386789'),
  authValidTime?: string(name='AuthValidTime', description='The time (UTC) when the authorization expires. If this parameter is empty, the authorization does not expire.', example='Fri,05Oct201816:00:00GMT'),
  description?: string(name='Description', description='The description of the authorization.', example='Queries weather based on the region name'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model SetApisAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model SetApisAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetApisAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Authorizes a specified application to call multiple APIs.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   API providers can authorize all applications to call their APIs.
 * *   API callers can authorize their own applications to call the APIs that they have purchased.
 *
 * @param request SetApisAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetApisAuthoritiesResponse
 */
async function setApisAuthoritiesWithOptions(request: SetApisAuthoritiesRequest, runtime: Util.RuntimeOptions): SetApisAuthoritiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.authValidTime)) {
    query['AuthValidTime'] = request.authValidTime;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetApisAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Authorizes a specified application to call multiple APIs.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   API providers can authorize all applications to call their APIs.
 * *   API callers can authorize their own applications to call the APIs that they have purchased.
 *
 * @param request SetApisAuthoritiesRequest
 * @return SetApisAuthoritiesResponse
 */
async function setApisAuthorities(request: SetApisAuthoritiesRequest): SetApisAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return setApisAuthoritiesWithOptions(request, runtime);
}

model SetAppsAuthToApiProductRequest {
  apiProductId?: string(name='ApiProductId', description='The ID of the API product.

This parameter is required.', example='117b7a64a8b3f064eaa4a47ac62aac5e'),
  appIds?: [ long ](name='AppIds', description='The IDs of the applications that you want to authorize.

This parameter is required.'),
  authValidTime?: string(name='AuthValidTime', description='The time (UTC) when the authorization expires. If this parameter is empty, the authorization does not expire.', example='2023-05-31T08:15:39Z'),
  description?: string(name='Description', description='The description of the authorization.', example='Test'),
  securityToken?: string(name='SecurityToken'),
}

model SetAppsAuthToApiProductResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model SetAppsAuthToApiProductResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetAppsAuthToApiProductResponseBody(name='body'),
}

/**
 * @summary Authorizes multiple applications to call APIs in an API product.
 *
 * @param request SetAppsAuthToApiProductRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetAppsAuthToApiProductResponse
 */
async function setAppsAuthToApiProductWithOptions(request: SetAppsAuthToApiProductRequest, runtime: Util.RuntimeOptions): SetAppsAuthToApiProductResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiProductId)) {
    query['ApiProductId'] = request.apiProductId;
  }
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.authValidTime)) {
    query['AuthValidTime'] = request.authValidTime;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetAppsAuthToApiProduct',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Authorizes multiple applications to call APIs in an API product.
 *
 * @param request SetAppsAuthToApiProductRequest
 * @return SetAppsAuthToApiProductResponse
 */
async function setAppsAuthToApiProduct(request: SetAppsAuthToApiProductRequest): SetAppsAuthToApiProductResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAppsAuthToApiProductWithOptions(request, runtime);
}

model SetAppsAuthoritiesRequest {
  apiId?: string(name='ApiId', description='The ID of the API. This ID is generated by the system and globally unique.

This parameter is required.', example='baacc592e63a4cb6a41920d9d3f91f38'),
  appIds?: string(name='AppIds', description='The IDs of applications. Separate multiple application IDs with commas (,). A maximum of 100 applications IDs can be entered.

This parameter is required.', example='2386789,3389798'),
  authValidTime?: string(name='AuthValidTime', description='The time (UTC) when the authorization expires. If this parameter is empty, the authorization does not expire.', example='Fri,05Oct201816:00:00GMT'),
  description?: string(name='Description', description='The description of the authorization.', example='Queries weather based on the region name'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='523e8dc7bbe04613b5b1d726c2a7889d'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model SetAppsAuthoritiesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D6E46F10-F26C-4AA0-BB69-FE2743D9AE62'),
}

model SetAppsAuthoritiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetAppsAuthoritiesResponseBody(name='body'),
}

/**
 * @summary Grants access permissions on a specified API to multiple applications.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   API providers can authorize all applications to call their APIs.
 * *   API callers can authorize their own applications to call the APIs that they have purchased.
 *
 * @param request SetAppsAuthoritiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetAppsAuthoritiesResponse
 */
async function setAppsAuthoritiesWithOptions(request: SetAppsAuthoritiesRequest, runtime: Util.RuntimeOptions): SetAppsAuthoritiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.authValidTime)) {
    query['AuthValidTime'] = request.authValidTime;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetAppsAuthorities',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Grants access permissions on a specified API to multiple applications.
 *
 * @description *   This operation is intended for API providers and callers.
 * *   API providers can authorize all applications to call their APIs.
 * *   API callers can authorize their own applications to call the APIs that they have purchased.
 *
 * @param request SetAppsAuthoritiesRequest
 * @return SetAppsAuthoritiesResponse
 */
async function setAppsAuthorities(request: SetAppsAuthoritiesRequest): SetAppsAuthoritiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAppsAuthoritiesWithOptions(request, runtime);
}

model SetDomainRequest {
  bindStageName?: string(name='BindStageName', description='The environment which you can access by using the domain name. If you do not specify this parameter, the domain name can be used to access all environments.

If you specify an environment, the domain name can be used to access only the specified environment. Valid values:

*   TEST
*   PRE
*   RELEASE

If you want to use the domain name to access all environments, set this parameter to an empty string ("").', example='RELEASE'),
  customDomainType?: string(name='CustomDomainType', description='The network type of the domain name to be bound. Default value: INTERNET. Valid values:

*   INTERNET
*   INTRANET. If you set this parameter to this value, the domain name cannot be used on the Internet.', example='INTERNET'),
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  isForce?: boolean(name='IsForce', description='Specifies whether this binding relationship takes precedence over the binding relationships between the domain name and other API groups. If you set this parameter to true, this binding relationship takes precedence, and the domain name is automatically unbound from other API groups. This operation brings risks. Proceed with caution.', example='false'),
  isHttpRedirectToHttps?: boolean(name='IsHttpRedirectToHttps', description='Specifies whether to redirect HTTP requests to HTTPS requests.', example='false'),
}

model SetDomainResponseBody = {
  domainBindingStatus?: string(name='DomainBindingStatus', description='The binding status of the custom domain name. Valid values:

*   **BINDING**: The domain name has been bound.
*   **BOUND**: The domain name has not been bound.', example='BINDING'),
  domainLegalStatus?: string(name='DomainLegalStatus', description='The validity status of the domain name. Valid values:

*   **NORMAL**: The domain name is valid.
*   **ABNORMAL**: The domain name is invalid. This status affects API calls and must be resolved as soon as possible.', example='NORMAL'),
  domainName?: string(name='DomainName', description='The custom domain name.', example='api.demo.com'),
  domainRemark?: string(name='DomainRemark', description='The remarks on the domain name, such as the cause of an exception.', example='None'),
  domainWebSocketStatus?: string(name='DomainWebSocketStatus', description='The status of the domain name that uses the WebSocket feature.', example='NORMAL'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.', example='927d50c0f2e54b359919923d908bb015'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='0AA90E87-3506-5AA6-AFFB-A4D53B4F6231'),
  subDomain?: string(name='SubDomain', description='The second-level domain name assigned to the API group. This domain name is used to test API calls.', example='xxx-cn-hangzhou.alicloudapi.com'),
}

model SetDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDomainResponseBody(name='body'),
}

/**
 * @summary Binds a custom domain name to a specified API group.
 *
 * @param request SetDomainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDomainResponse
 */
async function setDomainWithOptions(request: SetDomainRequest, runtime: Util.RuntimeOptions): SetDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bindStageName)) {
    query['BindStageName'] = request.bindStageName;
  }
  if (!Util.isUnset(request.customDomainType)) {
    query['CustomDomainType'] = request.customDomainType;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.isForce)) {
    query['IsForce'] = request.isForce;
  }
  if (!Util.isUnset(request.isHttpRedirectToHttps)) {
    query['IsHttpRedirectToHttps'] = request.isHttpRedirectToHttps;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDomain',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a custom domain name to a specified API group.
 *
 * @param request SetDomainRequest
 * @return SetDomainResponse
 */
async function setDomain(request: SetDomainRequest): SetDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDomainWithOptions(request, runtime);
}

model SetDomainCertificateRequest {
  caCertificateBody?: string(name='CaCertificateBody', description='The content of the CA certificate.', example='Content of the CA certificate'),
  certificateBody?: string(name='CertificateBody', description='The content of the certificate.', example='For more information, see the following request examples'),
  certificateName?: string(name='CertificateName', description='The name of the SSL certificate.

This parameter is required.', example='test_cert'),
  certificatePrivateKey?: string(name='CertificatePrivateKey', description='The private key of the SSL certificate.', example='For more information, see the following request examples'),
  clientCertSDnPassThrough?: boolean(name='ClientCertSDnPassThrough', description='If pass ssl_client_s_dn of the cert to backend header \\\\"X-Client-S-Dn\\\\".', example='True'),
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='api.demo.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='927d50c0f2e54b359919923d908bb015'),
  securityToken?: string(name='SecurityToken'),
  sslOcspCacheEnable?: boolean(name='SslOcspCacheEnable', description='If enable ssl OCSP cache.', example='True'),
  sslOcspEnable?: boolean(name='SslOcspEnable', description='If enable ssl OCSP.', example='True'),
  sslVerifyDepth?: string(name='SslVerifyDepth', description='The certificate verification depth.', example='2'),
}

model SetDomainCertificateResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='6EF60BEC-0242-43AF-BB20-270359FB54A7'),
}

model SetDomainCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDomainCertificateResponseBody(name='body'),
}

/**
 * @summary Uploads an SSL certificate for a specified custom domain name.
 *
 * @description *   This operation is intended for API providers.
 * *   The SSL certificate must match the custom domain name.
 * *   After the SSL certificate is bound, HTTPS-based API services become available.
 *
 * @param request SetDomainCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDomainCertificateResponse
 */
async function setDomainCertificateWithOptions(request: SetDomainCertificateRequest, runtime: Util.RuntimeOptions): SetDomainCertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.caCertificateBody)) {
    query['CaCertificateBody'] = request.caCertificateBody;
  }
  if (!Util.isUnset(request.certificateBody)) {
    query['CertificateBody'] = request.certificateBody;
  }
  if (!Util.isUnset(request.certificateName)) {
    query['CertificateName'] = request.certificateName;
  }
  if (!Util.isUnset(request.certificatePrivateKey)) {
    query['CertificatePrivateKey'] = request.certificatePrivateKey;
  }
  if (!Util.isUnset(request.clientCertSDnPassThrough)) {
    query['ClientCertSDnPassThrough'] = request.clientCertSDnPassThrough;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.sslOcspCacheEnable)) {
    query['SslOcspCacheEnable'] = request.sslOcspCacheEnable;
  }
  if (!Util.isUnset(request.sslOcspEnable)) {
    query['SslOcspEnable'] = request.sslOcspEnable;
  }
  if (!Util.isUnset(request.sslVerifyDepth)) {
    query['SslVerifyDepth'] = request.sslVerifyDepth;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDomainCertificate',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Uploads an SSL certificate for a specified custom domain name.
 *
 * @description *   This operation is intended for API providers.
 * *   The SSL certificate must match the custom domain name.
 * *   After the SSL certificate is bound, HTTPS-based API services become available.
 *
 * @param request SetDomainCertificateRequest
 * @return SetDomainCertificateResponse
 */
async function setDomainCertificate(request: SetDomainCertificateRequest): SetDomainCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDomainCertificateWithOptions(request, runtime);
}

model SetDomainWebSocketStatusRequest {
  actionValue?: string(name='ActionValue', description='The action.

This parameter is required.', example='OPEN'),
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='ac.fluvet.cn'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='cf976e63b70c4993807e7bb9345d4695'),
  securityToken?: string(name='SecurityToken'),
  WSSEnable?: string(name='WSSEnable', description='If enable WSS.', example='false'),
}

model SetDomainWebSocketStatusResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='61A16D46-EC04-5288-8A18-811B0F536CC2'),
}

model SetDomainWebSocketStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDomainWebSocketStatusResponseBody(name='body'),
}

/**
 * @summary Enables or disables WebSocket for a custom domain name.
 *
 * @param request SetDomainWebSocketStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDomainWebSocketStatusResponse
 */
async function setDomainWebSocketStatusWithOptions(request: SetDomainWebSocketStatusRequest, runtime: Util.RuntimeOptions): SetDomainWebSocketStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.actionValue)) {
    query['ActionValue'] = request.actionValue;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.WSSEnable)) {
    query['WSSEnable'] = request.WSSEnable;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDomainWebSocketStatus',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables or disables WebSocket for a custom domain name.
 *
 * @param request SetDomainWebSocketStatusRequest
 * @return SetDomainWebSocketStatusResponse
 */
async function setDomainWebSocketStatus(request: SetDomainWebSocketStatusRequest): SetDomainWebSocketStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDomainWebSocketStatusWithOptions(request, runtime);
}

model SetGroupAuthAppCodeRequest {
  authAppCode?: string(name='AuthAppCode', description='This parameter is required.'),
  groupId?: string(name='GroupId', description='This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
}

model SetGroupAuthAppCodeResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetGroupAuthAppCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetGroupAuthAppCodeResponseBody(name='body'),
}

/**
 * @summary 设置分组授权AppCode
 *
 * @param request SetGroupAuthAppCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetGroupAuthAppCodeResponse
 */
async function setGroupAuthAppCodeWithOptions(request: SetGroupAuthAppCodeRequest, runtime: Util.RuntimeOptions): SetGroupAuthAppCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.authAppCode)) {
    query['AuthAppCode'] = request.authAppCode;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetGroupAuthAppCode',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设置分组授权AppCode
 *
 * @param request SetGroupAuthAppCodeRequest
 * @return SetGroupAuthAppCodeResponse
 */
async function setGroupAuthAppCode(request: SetGroupAuthAppCodeRequest): SetGroupAuthAppCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setGroupAuthAppCodeWithOptions(request, runtime);
}

model SetIpControlApisRequest {
  apiIds?: string(name='ApiIds', description='The API IDs. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6,46fbb52840d146f186e38e8e70fc8c12'),
  groupId?: string(name='GroupId', description='The ID of the API group.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  ipControlId?: string(name='IpControlId', description='The ID of the ACL.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **PRE**
*   **TEST**

This parameter is required.', example='TEST'),
}

model SetIpControlApisResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model SetIpControlApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetIpControlApisResponseBody(name='body'),
}

/**
 * @summary Creates a binding relationship between specified access control lists (ACLs) and APIs.
 *
 * @description *   This operation is intended for API callers.
 * *   A maximum of 100 APIs can be bound at a time.
 *
 * @param request SetIpControlApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetIpControlApisResponse
 */
async function setIpControlApisWithOptions(request: SetIpControlApisRequest, runtime: Util.RuntimeOptions): SetIpControlApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ipControlId)) {
    query['IpControlId'] = request.ipControlId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetIpControlApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a binding relationship between specified access control lists (ACLs) and APIs.
 *
 * @description *   This operation is intended for API callers.
 * *   A maximum of 100 APIs can be bound at a time.
 *
 * @param request SetIpControlApisRequest
 * @return SetIpControlApisResponse
 */
async function setIpControlApis(request: SetIpControlApisRequest): SetIpControlApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return setIpControlApisWithOptions(request, runtime);
}

model SetSignatureApisRequest {
  apiIds?: string(name='ApiIds', description='The API IDs.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6,46fbb52840d146f186e38e8e70fc8c12'),
  groupId?: string(name='GroupId', description='The API group ID.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken'),
  signatureId?: string(name='SignatureId', description='The signature ID.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the testing environment

This parameter is required.', example='TEST'),
}

model SetSignatureApisResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model SetSignatureApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetSignatureApisResponseBody(name='body'),
}

/**
 * @summary Binds a signature key to APIs.
 *
 * @param request SetSignatureApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetSignatureApisResponse
 */
async function setSignatureApisWithOptions(request: SetSignatureApisRequest, runtime: Util.RuntimeOptions): SetSignatureApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.signatureId)) {
    query['SignatureId'] = request.signatureId;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetSignatureApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a signature key to APIs.
 *
 * @param request SetSignatureApisRequest
 * @return SetSignatureApisResponse
 */
async function setSignatureApis(request: SetSignatureApisRequest): SetSignatureApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return setSignatureApisWithOptions(request, runtime);
}

model SetTrafficControlApisRequest {
  apiIds?: string(name='ApiIds', description='The API ID for the specified operation. Separate multiple API IDs with commas (,). A maximum of 100 API IDs can be entered.

This parameter is required.', example='3b81fd160f5645e097cc8855d75a1cf6,46fbb52840d146f186e38e8e70fc8c12'),
  groupId?: string(name='GroupId', description='The ID of the API group containing the APIs to which you want to bind a specified throttling policy.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='556d15cb-0808-432d-ab07-33e6b961b703'),
  stageName?: string(name='StageName', description='The name of the runtime environment. Valid values:

*   **RELEASE**
*   **TEST**

This parameter is required.', example='RELEASE'),
  trafficControlId?: string(name='TrafficControlId', description='The ID of the throttling policy.

This parameter is required.', example='dd05f1c54d6749eda95f9fa6d491449a'),
}

model SetTrafficControlApisResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ004'),
}

model SetTrafficControlApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetTrafficControlApisResponseBody(name='body'),
}

/**
 * @summary Binds a throttling policy to APIs.
 *
 * @description *   This API is intended for API providers.
 * *   This API allows you to bind a specific throttling policy to up to 100 APIs at a time.
 *
 * @param request SetTrafficControlApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetTrafficControlApisResponse
 */
async function setTrafficControlApisWithOptions(request: SetTrafficControlApisRequest, runtime: Util.RuntimeOptions): SetTrafficControlApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiIds)) {
    query['ApiIds'] = request.apiIds;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  if (!Util.isUnset(request.trafficControlId)) {
    query['TrafficControlId'] = request.trafficControlId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetTrafficControlApis',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a throttling policy to APIs.
 *
 * @description *   This API is intended for API providers.
 * *   This API allows you to bind a specific throttling policy to up to 100 APIs at a time.
 *
 * @param request SetTrafficControlApisRequest
 * @return SetTrafficControlApisResponse
 */
async function setTrafficControlApis(request: SetTrafficControlApisRequest): SetTrafficControlApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return setTrafficControlApisWithOptions(request, runtime);
}

model SetVpcAccessRequest {
  description?: string(name='Description', description='The description of the VPC.', example='description of the VPC'),
  instanceId?: string(name='InstanceId', description='The ID of an ECS or SLB instance in the VPC.

This parameter is required.', example='i-uf6bzcg1pr4oh5jjmxxx'),
  name?: string(name='Name', description='The name of the authorization. The name must be unique.

This parameter is required.', example='test'),
  port?: int32(name='Port', description='The port number that corresponds to the instance.

This parameter is required.', example='80'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag.', example='key'),
      value?: string(name='Value', description='The value of the tag.', example='123'),
    }
  ](name='Tag', description='The tag of objects that match the rule. You can specify multiple tags.'),
  vpcId?: string(name='VpcId', description='The ID of the VPC. The VPC must be an available one that belongs to the same account as the API.

This parameter is required.', example='vpc-uf657qec7lx42paw3qxxx'),
  vpcTargetHostName?: string(name='VpcTargetHostName', description='The host of the backend service.', example='iot.hu***ng.com'),
}

model SetVpcAccessResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ015'),
  vpcAccessId?: string(name='VpcAccessId', description='The ID of the VPC access authorization.', example='4c68e061860f441ab72af7404137440e'),
}

model SetVpcAccessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetVpcAccessResponseBody(name='body'),
}

/**
 * @summary Creates a virtual private cloud (VPC) access authorization and enables reverse access.
 *
 * @description * This operation is intended for API providers.
 * * This operation is used to authorize API Gateway to access your VPC instance.
 *
 * @param request SetVpcAccessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetVpcAccessResponse
 */
async function setVpcAccessWithOptions(request: SetVpcAccessRequest, runtime: Util.RuntimeOptions): SetVpcAccessResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vpcTargetHostName)) {
    query['VpcTargetHostName'] = request.vpcTargetHostName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetVpcAccess',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a virtual private cloud (VPC) access authorization and enables reverse access.
 *
 * @description * This operation is intended for API providers.
 * * This operation is used to authorize API Gateway to access your VPC instance.
 *
 * @param request SetVpcAccessRequest
 * @return SetVpcAccessResponse
 */
async function setVpcAccess(request: SetVpcAccessRequest): SetVpcAccessResponse {
  var runtime = new Util.RuntimeOptions{};
  return setVpcAccessWithOptions(request, runtime);
}

model SetWildcardDomainPatternsRequest {
  domainName?: string(name='DomainName', description='The custom domain name.

This parameter is required.', example='*.prd.e-eir.com'),
  groupId?: string(name='GroupId', description='The ID of the API group. This ID is generated by the system and globally unique.

This parameter is required.', example='0009db9c828549768a200320714b8930'),
  securityToken?: string(name='SecurityToken'),
  wildcardDomainPatterns?: string(name='WildcardDomainPatterns', description='The wildcard domain name mode.', example='[\\\\"{svc}.prd.e-eir.com\\\\"]'),
}

model SetWildcardDomainPatternsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D0075BDA-8AED-5073-A70A-FE44E86AB20F'),
}

model SetWildcardDomainPatternsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetWildcardDomainPatternsResponseBody(name='body'),
}

/**
 * @summary Specifies a wildcard domain name template for a bound custom domain name.
 *
 * @param request SetWildcardDomainPatternsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetWildcardDomainPatternsResponse
 */
async function setWildcardDomainPatternsWithOptions(request: SetWildcardDomainPatternsRequest, runtime: Util.RuntimeOptions): SetWildcardDomainPatternsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.wildcardDomainPatterns)) {
    query['WildcardDomainPatterns'] = request.wildcardDomainPatterns;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetWildcardDomainPatterns',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Specifies a wildcard domain name template for a bound custom domain name.
 *
 * @param request SetWildcardDomainPatternsRequest
 * @return SetWildcardDomainPatternsResponse
 */
async function setWildcardDomainPatterns(request: SetWildcardDomainPatternsRequest): SetWildcardDomainPatternsResponse {
  var runtime = new Util.RuntimeOptions{};
  return setWildcardDomainPatternsWithOptions(request, runtime);
}

model SwitchApiRequest {
  apiId?: string(name='ApiId', description='The API ID.

This parameter is required.', example='d6f679aeb3be4b91b3688e887ca1fe16'),
  description?: string(name='Description', description='The description. The description can be up to 200 characters in length.

This parameter is required.', example='for_demo'),
  groupId?: string(name='GroupId', description='The API group ID.', example='123'),
  historyVersion?: string(name='HistoryVersion', description='The historical version number of the API.

This parameter is required.', example='20160705104552292'),
  securityToken?: string(name='SecurityToken'),
  stageName?: string(name='StageName', description='The environment. Valid values:

*   **RELEASE**: the production environment
*   **PRE**: the staging environment
*   **TEST**: the test environment

This parameter is required.', example='RELEASE'),
}

model SwitchApiResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BZ001'),
}

model SwitchApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchApiResponseBody(name='body'),
}

/**
 * @summary Switches the definition of an API in a specified runtime environment to a historical version.
 *
 * @param request SwitchApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchApiResponse
 */
async function switchApiWithOptions(request: SwitchApiRequest, runtime: Util.RuntimeOptions): SwitchApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.historyVersion)) {
    query['HistoryVersion'] = request.historyVersion;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stageName)) {
    query['StageName'] = request.stageName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchApi',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Switches the definition of an API in a specified runtime environment to a historical version.
 *
 * @param request SwitchApiRequest
 * @return SwitchApiResponse
 */
async function switchApi(request: SwitchApiRequest): SwitchApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchApiWithOptions(request, runtime);
}

model TagResourcesRequest {
  resourceId?: [ string ](name='ResourceId', description='The ID of the resource.

This parameter is required.', example='285bb759342649a1b70c2093a772e087'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Tags are bound to API groups, plug-ins, and applications. You can use tags to manage cloud resources by group. Valid values:

*   **apiGroup**
*   **plugin**
*   **app**

This parameter is required.', example='apiGroup'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of tag N.

This parameter is required.', example='env'),
      value?: string(name='Value', description='The value of tag N.

This parameter is required.', example='\\\\" \\\\"'),
    }
  ](name='Tag', description='The tag of objects that match the lifecycle rule. You can specify multiple tags.

This parameter is required.', example='2021022811'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary Creates a tag-resource relationship.
 *
 * @description *   All tags (key-value pairs) are applied to all resources of a specified ResourceId, with each resource specified as ResourceId.N.
 * *   Tag.N is a resource tag consisting of a key-value pair: Tag.N.Key and Tag.N.Value.
 * *   If you call this operation to tag multiple resources simultaneously, either all or none of the resources will be tagged.
 * *   If you specify Tag.1.Value in addition to required parameters, you must also specify Tag.1.Key. Otherwise, an InvalidParameter.TagKey error is reported. A tag that has a value must have the corresponding key, but the key can be an empty string.
 * *   If a tag with the same key has been bound to a resource, the new tag will overwrite the existing one.
 *
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a tag-resource relationship.
 *
 * @description *   All tags (key-value pairs) are applied to all resources of a specified ResourceId, with each resource specified as ResourceId.N.
 * *   Tag.N is a resource tag consisting of a key-value pair: Tag.N.Key and Tag.N.Value.
 * *   If you call this operation to tag multiple resources simultaneously, either all or none of the resources will be tagged.
 * *   If you specify Tag.1.Value in addition to required parameters, you must also specify Tag.1.Key. Otherwise, an InvalidParameter.TagKey error is reported. A tag that has a value must have the corresponding key, but the key can be an empty string.
 * *   If a tag with the same key has been bound to a resource, the new tag will overwrite the existing one.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', description='Specifies whether to delete all tags. This parameter is valid only when the **TagKey.N**parameter is not specified. Default value: false. Valid values:

*   **true**
*   **false**', example='true'),
  resourceId?: [ string ](name='ResourceId', description='The resource IDs.

This parameter is required.', example='285bb759342649a1b70c2093a772e087'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Tags are bound to API groups, plug-ins, and applications. You can use tags to manage cloud resources by group. Valid values:

*   **apiGroup**
*   **plugin**
*   **app**

This parameter is required.', example='apiGroup'),
  securityToken?: string(name='SecurityToken', description='The security token included in the WebSocket request header. The system uses this token to authenticate the request.', example='0f96f124-1276-4f81-b52b-c554240beb4c'),
  tagKey?: [ string ](name='TagKey', description='The tag keys of the resource.', example='env'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary Removes tags from resources.
 *
 * @description *   If you call this operation to untag multiple resources simultaneously, either all or none of the resources will be untagged.
 * *   If you specify resource IDs without specifying tag keys and set the All parameter to true, all tags bound to the specified resources will be deleted. If a resource does not have any tags, the request is not processed but a success is returned.
 * *   If you specify resource IDs without specifying tag keys and set the All parameter to false, the request is not processed but a success is returned.
 * *   When tag keys are specified, the All parameter is invalid.
 * *   When multiple resources and key-value pairs are specified, the specified tags bound to the resources are deleted.
 *
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes tags from resources.
 *
 * @description *   If you call this operation to untag multiple resources simultaneously, either all or none of the resources will be untagged.
 * *   If you specify resource IDs without specifying tag keys and set the All parameter to true, all tags bound to the specified resources will be deleted. If a resource does not have any tags, the request is not processed but a success is returned.
 * *   If you specify resource IDs without specifying tag keys and set the All parameter to false, the request is not processed but a success is returned.
 * *   When tag keys are specified, the All parameter is invalid.
 * *   When multiple resources and key-value pairs are specified, the specified tags bound to the resources are deleted.
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UpdatePrivateDNSRequest {
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.

This parameter is required.', example='api.demo.com'),
  records?: [ 
    {
      record?: string(name='Record', description='The resolution record.', example='192.168.0.2'),
      weight?: int32(name='Weight', description='The weight of the record.', example='100'),
    }
  ](name='Records', description='The resolution records. This parameter is valid only when Type is set to A.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for virtual private cloud (VPC) access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.

This parameter is required.', example='A'),
}

model UpdatePrivateDNSShrinkRequest {
  intranetDomain?: string(name='IntranetDomain', description='The internal domain name.

This parameter is required.', example='api.demo.com'),
  recordsShrink?: string(name='Records', description='The resolution records. This parameter is valid only when Type is set to A.

This parameter is required.'),
  securityToken?: string(name='SecurityToken'),
  type?: string(name='Type', description='The internal domain name resolution type. Valid values:

*   VPC: resolution for virtual private cloud (VPC) access authorizations. A resolution of this type can be bound only to traditional dedicated instances.
*   A: resolution that supports A records. A resolution of this type can be bound only to VPC integration dedicated instances.

This parameter is required.', example='A'),
}

model UpdatePrivateDNSResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='EF924FE4-2EDD-4CD3-89EC-34E4708574E7'),
}

model UpdatePrivateDNSResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdatePrivateDNSResponseBody(name='body'),
}

/**
 * @summary Modifies an internal domain name resolution.
 *
 * @param tmpReq UpdatePrivateDNSRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdatePrivateDNSResponse
 */
async function updatePrivateDNSWithOptions(tmpReq: UpdatePrivateDNSRequest, runtime: Util.RuntimeOptions): UpdatePrivateDNSResponse {
  Util.validateModel(tmpReq);
  var request = new UpdatePrivateDNSShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.records)) {
    request.recordsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.records, 'Records', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.intranetDomain)) {
    query['IntranetDomain'] = request.intranetDomain;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.recordsShrink)) {
    body['Records'] = request.recordsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdatePrivateDNS',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies an internal domain name resolution.
 *
 * @param request UpdatePrivateDNSRequest
 * @return UpdatePrivateDNSResponse
 */
async function updatePrivateDNS(request: UpdatePrivateDNSRequest): UpdatePrivateDNSResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePrivateDNSWithOptions(request, runtime);
}

model ValidateVpcConnectivityRequest {
  instanceId?: string(name='InstanceId', description='The ID of the API Gateway instance.

This parameter is required.', example='apigateway-hz-72bc18******'),
  securityToken?: string(name='SecurityToken'),
  vpcAccessId?: string(name='VpcAccessId', description='The ID of the VPC access authorization.

This parameter is required.', example='5f1b3216f9********e2c1297b6741dc'),
}

model ValidateVpcConnectivityResponseBody = {
  connected?: boolean(name='Connected', description='Indicates whether the API Gateway instance is connected to the port. Valid values:

*   **true**
*   **false**', example='True'),
  ipType?: string(name='IpType', description='Indicates whether the instance in the authorization is an ECS instance or an SLB instance when the instance ID in the authorization is an IP address. Valid values:

*   **ECS**
*   **SLB**
*   **INVALID**: The instance type corresponding to the IP address is invalid.', example='ECS'),
  requestId?: string(name='RequestId', description='The request ID.', example='9A591B5B-0EC2-5463-B8B8-1984AE3AEBF1'),
}

model ValidateVpcConnectivityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ValidateVpcConnectivityResponseBody(name='body'),
}

/**
 * @summary Tests the network connectivity between an API Gateway instance and a port on an Elastic Compute Service (ECS) or Server Load Balance (SLB) instance in a virtual private cloud (VPC) access authorization.
 *
 * @param request ValidateVpcConnectivityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ValidateVpcConnectivityResponse
 */
async function validateVpcConnectivityWithOptions(request: ValidateVpcConnectivityRequest, runtime: Util.RuntimeOptions): ValidateVpcConnectivityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcAccessId)) {
    query['VpcAccessId'] = request.vpcAccessId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ValidateVpcConnectivity',
    version = '2016-07-14',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Tests the network connectivity between an API Gateway instance and a port on an Elastic Compute Service (ECS) or Server Load Balance (SLB) instance in a virtual private cloud (VPC) access authorization.
 *
 * @param request ValidateVpcConnectivityRequest
 * @return ValidateVpcConnectivityResponse
 */
async function validateVpcConnectivity(request: ValidateVpcConnectivityRequest): ValidateVpcConnectivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return validateVpcConnectivityWithOptions(request, runtime);
}

